diff options
Diffstat (limited to 'classes/imx-boot-container.bbclass')
-rw-r--r-- | classes/imx-boot-container.bbclass | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 711bbd9e..3c6a89ed 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -20,11 +20,24 @@ # by variable UBOOT_PROVIDES_BOOT_CONTAINER, which is defined in the # base machine include file (imx-base.inc), and is set to "1" when the # 'imx-boot-container' is present in MACHINEOVERRIDES. +# +# NOTE: A backwards-compatible symlink is added for 'flash.bin', named +# 'imx-boot', during the deployment task. # 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)}" +IMX_BOOT_CONTAINER_FIRMWARE_SOC = "" +IMX_BOOT_CONTAINER_FIRMWARE_SOC:mx8mq-generic-bsp = " \ + signed_dp_imx8m.bin \ + signed_hdmi_imx8m.bin \ +" +IMX_BOOT_CONTAINER_FIRMWARE ?= " \ + ${IMX_BOOT_CONTAINER_FIRMWARE_SOC} \ + ${DDR_FIRMWARE_NAME} \ +" + # This package aggregates output deployed by other packages, so set the # appropriate dependencies for populate binaries task do_resolve_and_populate_binaries[depends] += " \ @@ -42,9 +55,9 @@ do_resolve_and_populate_binaries() { for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); if [ $j -eq $i ]; then - for ddr_firmware in ${DDR_FIRMWARE_NAME}; do - bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/${ddr_firmware_name}" - cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/ + for firmware in ${IMX_BOOT_CONTAINER_FIRMWARE}; do + bbnote "Copy firmware: ${firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/" + cp ${DEPLOY_DIR_IMAGE}/${firmware} ${B}/${config}/ done if [ -n "${ATF_MACHINE_NAME}" ]; then cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin @@ -80,14 +93,14 @@ do_deploy:append() { then install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} # When there's more than one word in UBOOT_CONFIG, - # this will overwrite the links created in - # previous loop iterations, effectively making - # u-boot.itb and flash.bin correspond to the _last_ - # word in UBOOT_CONFIG. This is also how all other - # artifacts handled by oe-core's u-boot.inc are - # treated. - ln -sf flash.bin-${MACHINE}-${type} flash.bin - ln -sf flash.bin-${MACHINE}-${type} imx-boot + # the first UBOOT_CONFIG listed will be the imx-boot binary + if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then + ln -sf flash.bin-${MACHINE}-${type} flash.bin + ln -sf flash.bin-${MACHINE}-${type} imx-boot + + else + bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" + fi fi done unset j |