* [warrior][PATCH] kernel-fitimage: introduce FIT_HASH_ALG
@ 2020-06-05 7:08 daisuke.yamane
2020-06-05 7:08 ` [warrior/zeus][PATCH] kernel-fitimage: introduce FIT_SIGN_ALG daisuke.yamane
2020-06-05 7:32 ` ✗ patchtest: failure for kernel-fitimage: introduce FIT_HASH_ALG (rev4) Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: daisuke.yamane @ 2020-06-05 7:08 UTC (permalink / raw)
To: openembedded-core
From: Ayoub Zaki <ayoub.zaki@embexus.com>
sanitize fitImage hash algorithm selection with FIT_HASH_ALG
switch default hash algorithm from sha1 to sha256
(From OE-Core rev: 8c9d5d59cb1575fac17c461090937df4cbb3d3b5)
Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/kernel-fitimage.bbclass | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 9e224daf05..b51882dce4 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -50,6 +50,9 @@ python __anonymous () {
# Options for the device tree compiler passed to mkimage '-D' feature:
UBOOT_MKIMAGE_DTCOPTS ??= ""
+# fitImage Hash Algo
+FIT_HASH_ALG ?= "sha256"
+
#
# Emit the fitImage ITS header
#
@@ -109,7 +112,7 @@ EOF
# $4 ... Compression type
fitimage_emit_section_kernel() {
- kernel_csum="sha1"
+ kernel_csum="${FIT_HASH_ALG}"
ENTRYPOINT="${UBOOT_ENTRYPOINT}"
if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
@@ -142,7 +145,7 @@ EOF
# $3 ... Path to DTB image
fitimage_emit_section_dtb() {
- dtb_csum="sha1"
+ dtb_csum="${FIT_HASH_ALG}"
dtb_loadline=""
dtb_ext=${DTB##*.}
@@ -176,7 +179,7 @@ EOF
# $3 ... Path to setup image
fitimage_emit_section_setup() {
- setup_csum="sha1"
+ setup_csum="${FIT_HASH_ALG}"
cat << EOF >> ${1}
setup@${2} {
@@ -203,7 +206,7 @@ EOF
# $3 ... Path to ramdisk image
fitimage_emit_section_ramdisk() {
- ramdisk_csum="sha1"
+ ramdisk_csum="${FIT_HASH_ALG}"
ramdisk_ctype="none"
ramdisk_loadline=""
ramdisk_entryline=""
@@ -261,7 +264,7 @@ EOF
# $6 ... default flag
fitimage_emit_section_config() {
- conf_csum="sha1"
+ conf_csum="${FIT_HASH_ALG}"
if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [warrior/zeus][PATCH] kernel-fitimage: introduce FIT_SIGN_ALG
2020-06-05 7:08 [warrior][PATCH] kernel-fitimage: introduce FIT_HASH_ALG daisuke.yamane
@ 2020-06-05 7:08 ` daisuke.yamane
2020-06-05 7:32 ` ✗ patchtest: failure for kernel-fitimage: introduce FIT_HASH_ALG (rev4) Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: daisuke.yamane @ 2020-06-05 7:08 UTC (permalink / raw)
To: openembedded-core
From: Richard Leitner <richard.leitner@skidata.com>
make fitImage configuration signature algorithm selectable with
FIT_SIGN_ALG.
(From OE-Core rev: e24b27a2b49e97cec6153f2d642d17a901b8ba12)
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/kernel-fitimage.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index e53487ee23..ec18a3d699 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -53,6 +53,9 @@ UBOOT_MKIMAGE_DTCOPTS ??= ""
# fitImage Hash Algo
FIT_HASH_ALG ?= "sha256"
+# fitImage Signature Algo
+FIT_SIGN_ALG ?= "rsa2048"
+
#
# Emit the fitImage ITS header
#
@@ -246,6 +249,7 @@ EOF
fitimage_emit_section_config() {
conf_csum="${FIT_HASH_ALG}"
+ conf_sign_algo="${FIT_SIGN_ALG}"
if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
@@ -327,7 +331,7 @@ EOF
cat << EOF >> ${1}
signature@1 {
- algo = "${conf_csum},rsa2048";
+ algo = "${conf_csum},${conf_sign_algo}";
key-name-hint = "${conf_sign_keyname}";
${sign_line}
};
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ patchtest: failure for kernel-fitimage: introduce FIT_HASH_ALG (rev4)
2020-06-05 7:08 [warrior][PATCH] kernel-fitimage: introduce FIT_HASH_ALG daisuke.yamane
2020-06-05 7:08 ` [warrior/zeus][PATCH] kernel-fitimage: introduce FIT_SIGN_ALG daisuke.yamane
@ 2020-06-05 7:32 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-06-05 7:32 UTC (permalink / raw)
To: Daisuke Yamane; +Cc: openembedded-core
== Series Details ==
Series: kernel-fitimage: introduce FIT_HASH_ALG (rev4)
Revision: 4
URL : https://patchwork.openembedded.org/series/9598/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 56e211d0f3)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-05 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-05 7:08 [warrior][PATCH] kernel-fitimage: introduce FIT_HASH_ALG daisuke.yamane
2020-06-05 7:08 ` [warrior/zeus][PATCH] kernel-fitimage: introduce FIT_SIGN_ALG daisuke.yamane
2020-06-05 7:32 ` ✗ patchtest: failure for kernel-fitimage: introduce FIT_HASH_ALG (rev4) Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox