]> code.ossystems Code Review - meta-freescale.git/commitdiff
classes: imx-boot-container: adapt to new u-boot generation
authorAndrey Zhizhikin <andrey.z@gmail.com>
Mon, 3 May 2021 10:07:57 +0000 (10:07 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 4 May 2021 17:07:09 +0000 (14:07 -0300)
Recent U-Boot versions switched from using customized image generation
mechanisms to binman. This requires that in addition to the flash.bin
boot container, the ITB is built and populated onto the raw boot
partition.

In addition, DDR firmware deployed together with SPL is now using fully
qualified file names (including version suffix), hence there is no need
to sanitize those binaries anymore when DDR firmware is packed.

Drop the specialized build target from UBOOT_MAKE_TARGET, as building of
flash.bin is now covered by default build.

Drop the pre-build step proceedure which was sanitizing version suffix
from the DDR firmware name.

Deploy additional u-boot.itb file that is required to be packed into the
raw boot partition.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
classes/imx-boot-container.bbclass

index 003f997a81566db3c67401f2af8bce792e25c7d1..41fe9cca739a7b2de99e261564f0e8856469fe27 100644 (file)
 # base machine include file (imx-base.inc), and is set to "1" when the
 # 'imx-boot-container' is present in MACHINEOVERRIDES.
 
-# Extend the UBOOT_MAKE_TARGET with additional target for U-Boot build
-# system to produce the boot container
-UBOOT_MAKE_TARGET += "flash.bin"
-
 # Define ATF binary file to be deployed to the U-Boot build folder
 ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin"
 ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}"
@@ -54,14 +50,8 @@ do_resolve_and_populate_binaries() {
                 j=$(expr $j + 1);
                 if [ $j -eq $i ]; then
                     for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
-                        # Sanitize the FW name as U-Boot expects it to be without version
-                        if [ -n "${DDR_FIRMWARE_VERSION}" ]; then
-                            ddr_firmware_name=$(echo $ddr_firmware | sed s/_${DDR_FIRMWARE_VERSION}//)
-                        else
-                            ddr_firmware_name="$ddr_firmware"
-                        fi
                         bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/${ddr_firmware_name}"
-                        cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/${ddr_firmware_name}
+                        cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/
                     done
                     if [ -n "${ATF_MACHINE_NAME}" ]; then
                         cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin
@@ -95,8 +85,9 @@ do_deploy_append() {
                 j=$(expr $j + 1);
                 if [ $j -eq $i ]
                 then
+                    install -m 0644 ${B}/${config}/u-boot.itb  ${DEPLOYDIR}/u-boot.itb-${MACHINE}-${UBOOT_CONFIG}
                     install -m 0644 ${B}/${config}/flash.bin  ${DEPLOYDIR}/flash.bin-${MACHINE}-${UBOOT_CONFIG}
-                    ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} imx-boot
+                    ln -sf u-boot.itb-${MACHINE}-${UBOOT_CONFIG} u-boot.itb
                     ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} flash.bin
                 fi
             done