Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Ayoub Zaki <ayoub.zaki@embexus.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [meta-oe][PATCH v2] kernel-fitimage: introduce FIT_HASH_ALG
Date: Thu, 2 Nov 2017 14:45:43 -0400	[thread overview]
Message-ID: <20171102184543.GL9221@denix.org> (raw)
In-Reply-To: <1509637698-17399-1-git-send-email-ayoub.zaki@embexus.com>

On Thu, Nov 02, 2017 at 04:48:18PM +0100, Ayoub Zaki wrote:
> sanitize fitImage hash algorithm selection with FIT_HASH_ALG
> switch default hash algorithm from sha1 to sha256
> 
> Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com>

Acked-by: Denys Dmytriyenko <denys@ti.com>


> ---
>  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 179185b..3cc3a33 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -36,6 +36,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
>  #
> @@ -95,7 +98,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
> @@ -128,7 +131,7 @@ EOF
>  # $3 ... Path to DTB image
>  fitimage_emit_section_dtb() {
>  
> -	dtb_csum="sha1"
> +	dtb_csum="${FIT_HASH_ALG}"
>  
>  	cat << EOF >> ${1}
>                  fdt@${2} {
> @@ -152,7 +155,7 @@ EOF
>  # $3 ... Path to setup image
>  fitimage_emit_section_setup() {
>  
> -	setup_csum="sha1"
> +	setup_csum="${FIT_HASH_ALG}"
>  
>  	cat << EOF >> ${1}
>                  setup@${2} {
> @@ -179,7 +182,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=""
> @@ -237,7 +240,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.7.4
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2017-11-02 18:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 15:48 [meta-oe][PATCH v2] kernel-fitimage: introduce FIT_HASH_ALG Ayoub Zaki
2017-11-02 18:45 ` Denys Dmytriyenko [this message]
2019-06-18  8:25 ` [meta-oe,v2] " Luca Boccassi
2019-06-18 15:53   ` Khem Raj
2019-06-18 16:11     ` Richard Purdie
2019-06-19  8:47       ` Luca Boccassi
2019-06-19  9:06         ` Alex Kiernan
2019-06-19  9:14           ` Luca Boccassi
2019-06-19 14:51             ` richard.purdie
2019-06-19 15:30               ` Alex Kiernan
2019-06-19 21:43                 ` richard.purdie

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=20171102184543.GL9221@denix.org \
    --to=denis@denix.org \
    --cc=ayoub.zaki@embexus.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