From: liu.ming50@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: LUIS ENRIQUEZ <luis.enriquez@se.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ming Liu <liu.ming50@gmail.com>
Subject: [OE-core] [kirkstone] [PATCH 2/2] kernel-fitimage.bbclass: add padding algorithm property in config nodes
Date: Thu, 1 Sep 2022 10:57:13 +0200 [thread overview]
Message-ID: <20220901085713.10361-3-liu.ming50@gmail.com> (raw)
In-Reply-To: <20220901085713.10361-1-liu.ming50@gmail.com>
From: LUIS ENRIQUEZ <luis.enriquez@se.com>
This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss.
Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 29d5336c728b28890bbaadebf0ccff00ad90a64d)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
meta/classes/kernel-fitimage.bbclass | 2 ++
meta/classes/uboot-sign.bbclass | 3 +++
2 files changed, 5 insertions(+)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 7b16633f6f..983392c23a 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -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
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"
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"
--
2.25.1
prev parent reply other threads:[~2022-09-01 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 8:57 [OE-core] [kirkstone] [PATCH 0/2] kernel-fitimage.bbclass: backport some fixes from master liu.ming50
2022-09-01 8:57 ` [OE-core] [kirkstone] [PATCH 1/2] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE liu.ming50
2022-09-01 8:57 ` liu.ming50 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901085713.10361-3-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=luis.enriquez@se.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox