summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMaxim Paymushkin <bmx666@users.noreply.github.com>2023-02-27 21:26:44 +0100
committerDaiane Angolini <daiane.angolini@foundries.io>2023-09-22 17:08:10 -0300
commit45db18727813b50b8f16a04830f82f7280f55591 (patch)
tree904a757688af0da26f3b8bd6a033473641c19556 /recipes-bsp
parent66552db05b59eecd551a1cf2f94cfaf9239a7379 (diff)
downloadmeta-freescale-45db18727813b50b8f16a04830f82f7280f55591.tar.gz
u-boot-imx: deploy multiple boot images for i.MX 8M
if env UBOOT_CONFIG contains multiple U-boot configurations, then "do_deploy_append_mx8m" always returns an error due to installing the same dtb-file defined in env UBOOT_DTB_NAME. Even env UBOOT_DTB_NAME contains the same dtb-name for all U-boot configs it can not be used without an extra suffix (U-boot config) because different U-boot configs can generate different dtb files based on the same dts file. In case different UBOOT_DTB_NAMEs are used in U-boot configurations, then the same flags for env UBOOT_DTB_NAME must be used in the machine configuration as in U-boot configurations. UBOOT_CONFIG = "a b" UBOOT_DTB_NAME[a] = "a.dtb" UBOOT_DTB_NAME[b] = "b.dtb" See PR #1439 and #1642 Signed-off-by: Maxim Paymushkin <maxim.paymushkin@gmail.com> Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-imx_2023.04.bb23
1 files changed, 21 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot-imx_2023.04.bb b/recipes-bsp/u-boot/u-boot-imx_2023.04.bb
index 3d588564..14c226f7 100644
--- a/recipes-bsp/u-boot/u-boot-imx_2023.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx_2023.04.bb
@@ -27,8 +27,27 @@ do_deploy:append:mx8m-generic-bsp() {
27 if [ $j -eq $i ] 27 if [ $j -eq $i ]
28 then 28 then
29 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 29 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
30 install -m 0644 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 30 install -m 0644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type}
31 install -m 0644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} 31 UBOOT_DTB_NAME_FLAGS="${type}:${UBOOT_DTB_NAME}"
32 for key_value in ${UBOOT_DTB_NAME_FLAGS}; do
33 local type_key="${key_value%%:*}"
34 local dtb_name="${key_value#*:}"
35 if [ "$type_key" = "$type" ]
36 then
37 bbnote "UBOOT_CONFIG = $type, UBOOT_DTB_NAME = $dtb_name"
38 # There is only one ${dtb_name}, the first one. All the other are with the type appended
39 if [ ! -f "${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}" ]; then
40 install -m 0644 ${B}/${config}/arch/arm/dts/${dtb_name} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}
41 else
42 bbwarn "Use custom wks.in for $dtb_name = $type"
43 fi
44 install -m 0644 ${B}/${config}/arch/arm/dts/${dtb_name} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}-${type}
45 fi
46 unset type_key
47 unset dtb_name
48 done
49
50 unset UBOOT_DTB_NAME_FLAGS
32 fi 51 fi
33 done 52 done
34 unset j 53 unset j