From 4744d2e28fab596554a57aaa888485c20b204d29 Mon Sep 17 00:00:00 2001 From: Stefano Viola Date: Fri, 24 Jun 2022 11:19:20 +0200 Subject: u-boot-toradex: deploy u-boot-with-spl.imx for imx6 The u-boot-with-spl.imx binary (if available), will be copied in the DEPLOYDIR for MACHINE colibri-imx6 and apalis-imx6. This binary is needed to implement bootloader software update where having only one binary instead of SPL + u-boot.bin simplifies things especially in the cloud platform side. Signed-off-by: Stefano Viola (cherry picked from commit meta-toradex-nxp e3461a0b4d163ab5dff0d8368028586a260ddbed) --- recipes-bsp/u-boot/u-boot_%.bbappend | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend index cb9a754..59af759 100644 --- a/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -22,6 +22,14 @@ nand_padding () { dd bs=1024 count=1 if=/dev/zero | cat - ${PADDING_DIR}/u-boot.imx.zero-padded > ${PADDING_DIR}/u-boot-nand.imx } +deploy_uboot_with_spl () { + for config in ${UBOOT_MACHINE}; do + if [ -f "${B}/${config}/u-boot-with-spl.imx" ]; then + install -D -m 644 ${B}/${config}/u-boot-with-spl.imx ${DEPLOYDIR}/u-boot-with-spl.imx + fi + done +} + # 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" @@ -38,6 +46,14 @@ do_compile:append:colibri-vf () { nand_padding } +do_deploy:append:colibri-imx6 () { + deploy_uboot_with_spl +} + +do_deploy:append:apalis-imx6 () { + deploy_uboot_with_spl +} + BOOT_TOOLS = "imx-boot-tools" do_deploy:append:mx8m-generic-bsp() { # Deploy u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary -- cgit v1.2.3