summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-11-23 17:14:07 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2022-04-26 11:33:19 +0200
commitefe6ef09d78efe549af8a89833d6e3548b590b9e (patch)
tree9c2b5af2d491cfb0484175901f76c048ae4359e7 /recipes-bsp/u-boot
parent4bbecd2db49138f9c9196394c8c5b7c880656f95 (diff)
u-boot: bbappend: allow to build boot container from u-boot
U-Boot mainline can build the boot container (imx-boot) from within the U-Boot tree. In OE this can be enabled with the following override: imx-boot-container. (imx-base.inc then sets: UBOOT_PROVIDES_BOOT_CONTAINER) However currently this provides the binary as flash.bin, so we add here to deploy it additionally under the old name imx-boot Amend the recipe to allow to enable this. Related-to: ELB-4243 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot_%.bbappend25
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend
index 987b3f4..cb9a754 100644
--- a/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -22,6 +22,10 @@ nand_padding () {
dd bs=1024 count=1 if=/dev/zero | cat - ${PADDING_DIR}/u-boot.imx.zero-padded > ${PADDING_DIR}/u-boot-nand.imx
}
+# build imx-boot from within U-Boot
+inherit ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '1', 'imx-boot-container', '')}
+DEPENDS:imx-boot-container += "bc-native bison-native dtc-native lzop-native python3-setuptools-native swig-native"
+
do_compile:append:colibri-imx6ull () {
nand_padding
}
@@ -55,3 +59,24 @@ do_deploy:append:mx8m-generic-bsp() {
unset i
fi
}
+
+do_deploy:append:imx-boot-container() {
+ # Deploy imx-boot
+ if [ -n "${UBOOT_CONFIG}" ]
+ then
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]
+ then
+ install -d ${DEPLOYDIR}
+ install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/imx-boot-${MACHINE}-${type}
+ ln -sf imx-boot-${MACHINE}-${type} ${DEPLOYDIR}/imx-boot
+ fi
+ done
+ unset j
+ done
+ unset i
+ fi
+}