Skip to contentSkip to conversation

kernel-fitimage.bbclass: add padding algorithm property in config nodes

PATCH In review LUIS ENRIQUEZ 1 participant 2 messages Jul 16, 2022 – Jul 31, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitimage.bbclass: add padding algorithm property in config nodes

This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss.

From: LUIS ENRIQUEZ <[email protected]>

---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 meta/classes/uboot-sign.bbclass      | 3 +++
 2 files changed, 5 insertions(+)
meta/classes/kernel-fitimage.bbclass +2 -0
index 2112ae4cfa..753164551c 100644
@@ -346,6 +346,7 @@ fitimage_emit_section_config() {
 
 	conf_csum="${FIT_HASH_ALG}"
 	conf_sign_algo="${FIT_SIGN_ALG}"
+	conf_padding_algo="${FIT_PAD_ALG}"
 	if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
 		conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
 	fi
@@ -465,6 +466,7 @@ EOF
                         signature-1 {
                                 algo = "$conf_csum,$conf_sign_algo";
                                 key-name-hint = "$conf_sign_keyname";
+                                padding = "$conf_padding_algo";
                                 $sign_line
                         };
 EOF
meta/classes/uboot-sign.bbclass +3 -0
index 31ffe1f472..eecdec9160 100644
@@ -73,6 +73,9 @@ UBOOT_FIT_HASH_ALG ?= "sha256"
 FIT_SIGN_ALG ?= "rsa2048"
 UBOOT_FIT_SIGN_ALG ?= "rsa2048"
 
+# Kernel / U-Boot fitImage Padding Algo
+FIT_PAD_ALG ?= "pkcs-1.5"
+
 # Generate keys for signing Kernel / U-Boot fitImage
 FIT_GENERATE_KEYS ?= "0"
 UBOOT_FIT_GENERATE_KEYS ?= "0"
Signature · 1 line
2.34.1
#1 lore raw

Hello,

This patch could be cherry-picked into kirkstone, please?

Thanks ;)

Luis