openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: reatmon@ti.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] Revert "uboot-sign: fix U-Boot binary with public key"
Date: Sun, 08 Dec 2024 22:22:22 +0000	[thread overview]
Message-ID: <f33814f998b09438feadedbab1ab04c536600496.camel@linuxfoundation.org> (raw)
In-Reply-To: <20241206210917.31123-1-reatmon@ti.com>

On Fri, 2024-12-06 at 15:09 -0600, Ryan Eatmon via lists.openembedded.org wrote:
> This reverts commit 0d14e99aa18ee38293df63d585fafc270a4538be.
> 
> The patch removed logic required for correct handling of
> UBOOT_SUFFIX=img or UBOOT_SUFFIX=rom.  We need to find a better way to
> handle the fix for [YOCTO #15649].
> 
> Signed-off-by:  Ryan Eatmon <reatmon@ti.com>
> ---
>  meta/classes-recipe/uboot-sign.bbclass | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
> index 7ee73b872a..a17be745ce 100644
> --- a/meta/classes-recipe/uboot-sign.bbclass
> +++ b/meta/classes-recipe/uboot-sign.bbclass
> @@ -122,7 +122,13 @@ concat_dtb() {
>  	# If we're not using a signed u-boot fit, concatenate SPL w/o DTB & U-Boot DTB
>  	# with public key (otherwise U-Boot will be packaged by uboot_fitimage_assemble)
>  	if [ "${SPL_SIGN_ENABLE}" != "1" ] ; then
> -		if [ -e "${UBOOT_NODTB_BINARY}" -a -e "${UBOOT_DTB_BINARY}" ]; then
> +		if [ "x${UBOOT_SUFFIX}" = "ximg" -o "x${UBOOT_SUFFIX}" = "xrom" ] && \
> +			[ -e "${UBOOT_DTB_BINARY}" ]; then
> +			oe_runmake EXT_DTB="${UBOOT_DTB_SIGNED}" ${UBOOT_MAKE_TARGET}
> +			if [ -n "${binary}" ]; then
> +				cp ${binary} ${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
> +			fi
> +		elif [ -e "${UBOOT_NODTB_BINARY}" -a -e "${UBOOT_DTB_BINARY}" ]; then
>  			if [ -n "${binary}" ]; then
>  				cat ${UBOOT_NODTB_BINARY} ${UBOOT_DTB_SIGNED} | tee ${binary} > \
>  					${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
> 

I'm in two minds about whether to take this or not. The code is clearly
needed for some platforms however the selftests don't cover it and I
doubt it is documented either :/

If I take this, can we add in some better testing please?

Cheers,

Richard



  reply	other threads:[~2024-12-08 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 21:09 [OE-core][PATCH] Revert "uboot-sign: fix U-Boot binary with public key" Ryan Eatmon
2024-12-08 22:22 ` Richard Purdie [this message]
2024-12-09 20:40   ` Ryan Eatmon
2024-12-16 17:26     ` 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=f33814f998b09438feadedbab1ab04c536600496.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=reatmon@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).