From 8bb147f9396d8fbe9385b41511d7f88163cf5149 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 3 May 2021 10:07:57 +0000 Subject: classes: imx-boot-container: adapt to new u-boot generation 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 --- classes/imx-boot-container.bbclass | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'classes/imx-boot-container.bbclass') diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 003f997a..41fe9cca 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -21,10 +21,6 @@ # 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 -- cgit v1.2.3-54-g00ecf