diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index ae53b9019c..6bbe457dfa 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -16,6 +16,11 @@ python () { raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set") } +# Allow setting an additional version string that will be picked up by the +# u-boot build system and appended to the u-boot version. If the .scmversion +# file already exists it will not be overwritten. +UBOOT_LOCALVERSION ?= "" + # Some versions of u-boot use .bin and others use .img. By default use .bin # but enable individual recipes to change this value. UBOOT_SUFFIX ?= "bin" @@ -40,6 +45,13 @@ do_compile () { unset LDFLAGS unset CFLAGS unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + oe_runmake ${UBOOT_MACHINE} oe_runmake ${UBOOT_MAKE_TARGET} } |