summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/u-boot/u-boot.inc
diff options
context:
space:
mode:
authorChase Maupin <Chase.Maupin@ti.com>2013-04-11 08:03:13 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:03 +0100
commit5af9ca580f90758bb3939401743c4813e2e32989 (patch)
tree9ad4cc723f1ebfc502e77e176c96eed6d854a54c /meta/recipes-bsp/u-boot/u-boot.inc
parent6dc9a7edaf27d0ca88165e34b1c968c6cd2329fa (diff)
downloadpoky-5af9ca580f90758bb3939401743c4813e2e32989.tar.gz
u-boot: Add UBOOT_LOCALVERSION to control version string
* Add a variable called UBOOT_LOCALVERSION which when set will place a version string in the .scmversion file of the u-boot sources. This string will be picked up by the u-boot Makefile and will be appended to the u-boot version. This is done to make it easier to identify what revision of the u-boot sources are being run. For example you can use a setting like the following to add the short commit id to the u-boot version string: UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}" (From OE-Core rev: 566298409408c6103f7a9871bb13ae5449c4fd64) Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/u-boot/u-boot.inc')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc12
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 () {
16 raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set") 16 raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set")
17} 17}
18 18
19# Allow setting an additional version string that will be picked up by the
20# u-boot build system and appended to the u-boot version. If the .scmversion
21# file already exists it will not be overwritten.
22UBOOT_LOCALVERSION ?= ""
23
19# Some versions of u-boot use .bin and others use .img. By default use .bin 24# Some versions of u-boot use .bin and others use .img. By default use .bin
20# but enable individual recipes to change this value. 25# but enable individual recipes to change this value.
21UBOOT_SUFFIX ?= "bin" 26UBOOT_SUFFIX ?= "bin"
@@ -40,6 +45,13 @@ do_compile () {
40 unset LDFLAGS 45 unset LDFLAGS
41 unset CFLAGS 46 unset CFLAGS
42 unset CPPFLAGS 47 unset CPPFLAGS
48
49 if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
50 then
51 echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
52 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
53 fi
54
43 oe_runmake ${UBOOT_MACHINE} 55 oe_runmake ${UBOOT_MACHINE}
44 oe_runmake ${UBOOT_MAKE_TARGET} 56 oe_runmake ${UBOOT_MAKE_TARGET}
45} 57}