diff options
author | LUIS ENRIQUEZ <luis.enriquez@se.com> | 2022-07-16 17:52:22 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-19 10:54:20 +0100 |
commit | 476a89a436a57d63804a76f8de2c7a9275a34c44 (patch) | |
tree | a7c46bd0d1a7b89e67bf383c764ffc46f13107ab | |
parent | b53880d3400b316f1a8f2108a97658104cc008f2 (diff) | |
download | poky-476a89a436a57d63804a76f8de2c7a9275a34c44.tar.gz |
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 OE-Core rev: 29d5336c728b28890bbaadebf0ccff00ad90a64d)
Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/uboot-sign.bbclass | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 2112ae4cfa..753164551c 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
@@ -346,6 +346,7 @@ fitimage_emit_section_config() { | |||
346 | 346 | ||
347 | conf_csum="${FIT_HASH_ALG}" | 347 | conf_csum="${FIT_HASH_ALG}" |
348 | conf_sign_algo="${FIT_SIGN_ALG}" | 348 | conf_sign_algo="${FIT_SIGN_ALG}" |
349 | conf_padding_algo="${FIT_PAD_ALG}" | ||
349 | if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then | 350 | if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then |
350 | conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" | 351 | conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" |
351 | fi | 352 | fi |
@@ -465,6 +466,7 @@ EOF | |||
465 | signature-1 { | 466 | signature-1 { |
466 | algo = "$conf_csum,$conf_sign_algo"; | 467 | algo = "$conf_csum,$conf_sign_algo"; |
467 | key-name-hint = "$conf_sign_keyname"; | 468 | key-name-hint = "$conf_sign_keyname"; |
469 | padding = "$conf_padding_algo"; | ||
468 | $sign_line | 470 | $sign_line |
469 | }; | 471 | }; |
470 | EOF | 472 | EOF |
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass index 31ffe1f472..eecdec9160 100644 --- a/meta/classes/uboot-sign.bbclass +++ b/meta/classes/uboot-sign.bbclass | |||
@@ -73,6 +73,9 @@ UBOOT_FIT_HASH_ALG ?= "sha256" | |||
73 | FIT_SIGN_ALG ?= "rsa2048" | 73 | FIT_SIGN_ALG ?= "rsa2048" |
74 | UBOOT_FIT_SIGN_ALG ?= "rsa2048" | 74 | UBOOT_FIT_SIGN_ALG ?= "rsa2048" |
75 | 75 | ||
76 | # Kernel / U-Boot fitImage Padding Algo | ||
77 | FIT_PAD_ALG ?= "pkcs-1.5" | ||
78 | |||
76 | # Generate keys for signing Kernel / U-Boot fitImage | 79 | # Generate keys for signing Kernel / U-Boot fitImage |
77 | FIT_GENERATE_KEYS ?= "0" | 80 | FIT_GENERATE_KEYS ?= "0" |
78 | UBOOT_FIT_GENERATE_KEYS ?= "0" | 81 | UBOOT_FIT_GENERATE_KEYS ?= "0" |