diff options
Diffstat (limited to 'classes/imx-boot-container.bbclass')
-rw-r--r-- | classes/imx-boot-container.bbclass | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 3ffa7cbd..53c70a0b 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -18,43 +18,48 @@ # # Class inheritance is performed in u-boot-fslc recipe, and is controlled # 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. +# base machine include file (imx-base.inc). +# +# 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] += " \ ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \ - imx-atf:do_deploy \ + ${IMX_DEFAULT_ATF_PROVIDER}:do_deploy \ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \ " -# Append make flags to include ATF load address -EXTRA_OEMAKE += "ATF_LOAD_ADDR=${ATF_LOAD_ADDR}" - # Define an additional task that collects binary output from dependent packages # and deploys them into the U-Boot build folder do_resolve_and_populate_binaries() { - if [ ! -n "${ATF_LOAD_ADDR}" ]; then - bberror "ATF_LOAD_ADDR is undefined, result binary would be unusable!" - fi - 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 - 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}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin else bberror "ATF binary is undefined, result binary would be unusable!" fi @@ -85,17 +90,16 @@ 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}-${type} 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 u-boot.itb-${MACHINE}-${type} u-boot.itb - ln -sf flash.bin-${MACHINE}-${type} flash.bin + # 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 |