diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot.inc')
-rw-r--r-- | recipes-bsp/u-boot/u-boot.inc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc index a7d6828..56265ff 100644 --- a/recipes-bsp/u-boot/u-boot.inc +++ b/recipes-bsp/u-boot/u-boot.inc @@ -4,7 +4,7 @@ SECTION = "bootloaders" PROVIDES = "virtual/bootloader" # New U-Boot with suppressed version. -PR="m1" +PR="m2" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" @@ -69,6 +69,25 @@ UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" FILES_${PN}-dev += "${includedir}/u-boot/* ${includedir}/u-boot/configs/* ${includedir}/u-boot/asm/*" +# Put the PR into the U-Boot image. u-boot allows a local +# version in a file called localversion.* +# For some reason, this must be written in python. +do_patch_append () { + try: + S = d.getVar("S",True) + except TypeError: + bb.fatal("S is missing from recipe") + + f = open(S + "/localversion.mt","w") + + try: + PR = d.getVar("PR",True) + except TypeError: + bb.fatal("PR is missing from recipe") + f.write(PR + os.linesep) +} + + do_compile () { if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk |