summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2025-03-10 10:35:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-11 11:20:34 +0000
commitdabd582240ce51604621d8fd72ac2b5ded942974 (patch)
tree3d4040ea41669257a3d61e2c4c841b3806f7d716
parent080cd0899c13e6ab69ca8fe1dff7915188b62051 (diff)
downloadpoky-dabd582240ce51604621d8fd72ac2b5ded942974.tar.gz
linux-fitimage: sign setup sections
If FIT_SIGN_INDIVIDUAL is set to “1”, a signature section is added to all screen sections, but not to the setup section. To match the setup section with all other sections, the signature is also added. This also helps to implement the associated tests generically. This change is intended to make the code more consistent. However, it is not intended to make the FIT_SIGN_INDIVIDUAL function more popular. Technically, it would be better to remove the signature from all other image sections and discard the FIT_SIGN_INDIVIDUAL function, the use of which is no longer recommended anyway. (From OE-Core rev: 8bf6a9c07cdde8fc8bbd4bb61a4886ccc02a570f) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/kernel-fitimage.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index f41509d308..07786647e1 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -243,6 +243,8 @@ EOF
243fitimage_emit_section_setup() { 243fitimage_emit_section_setup() {
244 244
245 setup_csum="${FIT_HASH_ALG}" 245 setup_csum="${FIT_HASH_ALG}"
246 setup_sign_algo="${FIT_SIGN_ALG}"
247 setup_sign_keyname="${UBOOT_SIGN_IMG_KEYNAME}"
246 248
247 cat << EOF >> $1 249 cat << EOF >> $1
248 setup-$2 { 250 setup-$2 {
@@ -259,6 +261,17 @@ fitimage_emit_section_setup() {
259 }; 261 };
260 }; 262 };
261EOF 263EOF
264
265 if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$setup_sign_keyname" ] ; then
266 sed -i '$ d' $1
267 cat << EOF >> $1
268 signature-1 {
269 algo = "$setup_csum,$setup_sign_algo";
270 key-name-hint = "$setup_sign_keyname";
271 };
272 };
273EOF
274 fi
262} 275}
263 276
264# 277#