summaryrefslogtreecommitdiffstats
path: root/meta/classes/uboot-sign.bbclass
diff options
context:
space:
mode:
authorThomas Perrot <thomas.perrot@bootlin.com>2021-10-27 16:04:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-09 13:49:51 +0000
commit7c856fbca3fa2aa3b99aecbe9b056609a011c9c1 (patch)
treec5c8c95437f6385fede9a68581603639638d4c57 /meta/classes/uboot-sign.bbclass
parent37b0f34817928a6a0ac31f8dc12cb9debe2ff920 (diff)
downloadpoky-7c856fbca3fa2aa3b99aecbe9b056609a011c9c1.tar.gz
uboot-sign: fix the concatenation when multiple U-BOOT configurations are specified
Some BSPs, especially those of meta-freescale and meta-ti allow to build U-Boot binaries using different configuration for a given target, for example: - UBOOT_CONFIG ??= "tfa-secure-boot tfa" - UBOOT_CONFIG ??= "nand sdcard spi nor" When this is the case the public key wasn't concatenated to all U-Boot binaries built. (From OE-Core rev: dfd71ae3d102f3010c6117d774e9739a322930f6) Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/uboot-sign.bbclass')
-rw-r--r--meta/classes/uboot-sign.bbclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index bae8cada0a..8d136e9405 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -131,6 +131,20 @@ concat_dtb_helper() {
131 elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then 131 elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then
132 cd ${DEPLOYDIR} 132 cd ${DEPLOYDIR}
133 cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE} 133 cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
134
135 if [ -n "${UBOOT_CONFIG}" ]
136 then
137 for config in ${UBOOT_MACHINE}; do
138 i=$(expr $i + 1);
139 for type in ${UBOOT_CONFIG}; do
140 j=$(expr $j + 1);
141 if [ $j -eq $i ]
142 then
143 cp ${UBOOT_IMAGE} ${B}/${CONFIG_B_PATH}/u-boot-$type.${UBOOT_SUFFIX}
144 fi
145 done
146 done
147 fi
134 else 148 else
135 bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available." 149 bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
136 fi 150 fi
@@ -205,7 +219,7 @@ install_helper() {
205 fi 219 fi
206} 220}
207 221
208# Install SPL dtb and u-boot nodtb to datadir, 222# Install SPL dtb and u-boot nodtb to datadir,
209install_spl_helper() { 223install_spl_helper() {
210 if [ -f "${SPL_DIR}/${SPL_DTB_BINARY}" ]; then 224 if [ -f "${SPL_DIR}/${SPL_DTB_BINARY}" ]; then
211 install -Dm 0644 ${SPL_DIR}/${SPL_DTB_BINARY} ${D}${datadir}/${SPL_DTB_IMAGE} 225 install -Dm 0644 ${SPL_DIR}/${SPL_DTB_BINARY} ${D}${datadir}/${SPL_DTB_IMAGE}