diff options
author | Andrey Zhizhikin <andrey.z@gmail.com> | 2021-05-03 10:07:57 +0000 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2021-05-04 14:07:09 -0300 |
commit | 8bb147f9396d8fbe9385b41511d7f88163cf5149 (patch) | |
tree | 415c3467bdd2867c5d91d28c7c053ad297bd34f0 /classes | |
parent | e2eda5e9eaf4523f1134860fce4929d27c551469 (diff) | |
download | meta-freescale-8bb147f9396d8fbe9385b41511d7f88163cf5149.tar.gz |
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 <andrey.z@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/imx-boot-container.bbclass | 15 |
1 files changed, 3 insertions, 12 deletions
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 @@ | |||
21 | # base machine include file (imx-base.inc), and is set to "1" when the | 21 | # base machine include file (imx-base.inc), and is set to "1" when the |
22 | # 'imx-boot-container' is present in MACHINEOVERRIDES. | 22 | # 'imx-boot-container' is present in MACHINEOVERRIDES. |
23 | 23 | ||
24 | # Extend the UBOOT_MAKE_TARGET with additional target for U-Boot build | ||
25 | # system to produce the boot container | ||
26 | UBOOT_MAKE_TARGET += "flash.bin" | ||
27 | |||
28 | # Define ATF binary file to be deployed to the U-Boot build folder | 24 | # Define ATF binary file to be deployed to the U-Boot build folder |
29 | ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin" | 25 | ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin" |
30 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" | 26 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" |
@@ -54,14 +50,8 @@ do_resolve_and_populate_binaries() { | |||
54 | j=$(expr $j + 1); | 50 | j=$(expr $j + 1); |
55 | if [ $j -eq $i ]; then | 51 | if [ $j -eq $i ]; then |
56 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do | 52 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do |
57 | # Sanitize the FW name as U-Boot expects it to be without version | ||
58 | if [ -n "${DDR_FIRMWARE_VERSION}" ]; then | ||
59 | ddr_firmware_name=$(echo $ddr_firmware | sed s/_${DDR_FIRMWARE_VERSION}//) | ||
60 | else | ||
61 | ddr_firmware_name="$ddr_firmware" | ||
62 | fi | ||
63 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/${ddr_firmware_name}" | 53 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/${ddr_firmware_name}" |
64 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/${ddr_firmware_name} | 54 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/ |
65 | done | 55 | done |
66 | if [ -n "${ATF_MACHINE_NAME}" ]; then | 56 | if [ -n "${ATF_MACHINE_NAME}" ]; then |
67 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin | 57 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin |
@@ -95,8 +85,9 @@ do_deploy_append() { | |||
95 | j=$(expr $j + 1); | 85 | j=$(expr $j + 1); |
96 | if [ $j -eq $i ] | 86 | if [ $j -eq $i ] |
97 | then | 87 | then |
88 | install -m 0644 ${B}/${config}/u-boot.itb ${DEPLOYDIR}/u-boot.itb-${MACHINE}-${UBOOT_CONFIG} | ||
98 | install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${UBOOT_CONFIG} | 89 | install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${UBOOT_CONFIG} |
99 | ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} imx-boot | 90 | ln -sf u-boot.itb-${MACHINE}-${UBOOT_CONFIG} u-boot.itb |
100 | ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} flash.bin | 91 | ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} flash.bin |
101 | fi | 92 | fi |
102 | done | 93 | done |