diff options
author | John Klug <john.klug@multitech.com> | 2019-04-10 11:07:50 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-04-10 11:07:50 -0500 |
commit | 34c9bd4ad5b15ac69bc8cb941038f6681657b6e1 (patch) | |
tree | 79579c19b4993376534feac94ef4c83e28ae6517 /recipes-bsp/u-boot | |
parent | 22ae3b86dcd1c7db62b151b91889a52cd167a6ee (diff) | |
download | meta-multitech-34c9bd4ad5b15ac69bc8cb941038f6681657b6e1.tar.gz meta-multitech-34c9bd4ad5b15ac69bc8cb941038f6681657b6e1.tar.bz2 meta-multitech-34c9bd4ad5b15ac69bc8cb941038f6681657b6e1.zip |
Put the PR into the U-Boot image
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r-- | recipes-bsp/u-boot/u-boot.inc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc index 7e6ad74..d4fa04a 100644 --- a/recipes-bsp/u-boot/u-boot.inc +++ b/recipes-bsp/u-boot/u-boot.inc @@ -67,6 +67,24 @@ 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. If you can think of a better way, be my guest. +# Why must it 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 @@ -90,7 +108,8 @@ do_compile () { j=`expr $j + 1`; if [ $j -eq $i ] then - oe_runmake O=${config} ${config} --defconfig mtconfig + echo 'JAK was here' + oe_runmake PATCHLEVEL=${PR} O=${config} ${config} --defconfig mtconfig oe_runmake O=${config} ${UBOOT_MAKE_TARGET} cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} fi @@ -99,7 +118,8 @@ do_compile () { done unset i else - oe_runmake ${UBOOT_MACHINE} + echo 'JAK 2 was here' + oe_runmake PATCHLEVEL=${PR} ${UBOOT_MACHINE} oe_runmake ${UBOOT_MAKE_TARGET} fi |