Skip to content
Snippets Groups Projects
Commit 3a2f42e3 authored by Martin Oemus's avatar Martin Oemus Committed by Tobias Kahlki
Browse files

u-boot-imx: set DISTRO_VERSION as UBOOT_LOCALVERSION

This commit changes the former custom LOCALVERSION to be set to
DISTRO_VERSION and introduces a new bitbake class
seco-u-boot-localversion which was copied from fsl-u-boot-localversion.
The orignal class takes the LOCALVERSION and writes it at build time into a
.scmversion file which is then picked up by U-Boot and used as its
PLAIN_VERSION symbol which is then used for displaying banners, in the
version command, etc. The new class adds a parameter which allows the
U-boot git hash to be put before the LOCALVERSION. Thus we achieve a
version string like: <u-boot release>[<u-boot git hash>]<local version>.
parent 254881ba
No related branches found
No related tags found
1 merge request!386install board info environment information into the device tree
Pipeline #64616 passed with stage
in 23 seconds
# Seco U-Boot LOCALVERSION extension
# adapted from meta-freescale/classes/fsl-u-boot-localversion.bbclass
#
# This allow to easy reuse of code between different U-Boot recipes
#
# The following options are supported:
#
# SCMVERSION Puts the Git hash in U-Boot local version
# LOCALVERSION Value used in LOCALVERSION (default to '+fslc')
#
# Copyright 2014 (C) O.S. Systems Software LTDA.
SCMVERSION ??= "y"
LOCALVERSION ??= "+fslc"
SCMVERSION_BEFORE_LOCALVERSION ??= "n"
UBOOT_LOCALVERSION = "${LOCALVERSION}"
do_compile:prepend() {
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null`
if [ "${SCMVERSION_BEFORE_LOCALVERSION}" = "y" ]; then
printf "%s%s%s" +g $head "${UBOOT_LOCALVERSION}" > ${S}/.scmversion
printf "%s%s%s" +g $head "${UBOOT_LOCALVERSION}" > ${B}/.scmversion
else
printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion
printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion
fi
else
printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion
printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion
fi
}
......@@ -2,7 +2,9 @@
BBPATH .= ":${LAYERDIR}"
# We have a packages directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILES += " \
${LAYERDIR}/classes/*.bbclass \
${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "seconorth-machine"
......
......@@ -6,13 +6,15 @@ LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a
SRCBRANCH = "lf_v2021.04"
SRC_URI = "git://github.com/nxp-imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
SRCREV = "263b27e076a0f6e5dcc80227a235f0af73718342"
LOCALVERSION ?= "-imx_v2021.04_5.10.72_2.2.0"
LOCALVERSION ?= "-${DISTRO_VERSION}"
SCMVERSION_BEFORE_LOCALVERSION = "y"
DEPENDS += "flex-native bison-native bc-native dtc-native"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
inherit fsl-u-boot-localversion
inherit seco-u-boot-localversion
BOOT_TOOLS = "imx-boot-tools"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment