Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>
Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] boot/uboot/uboot.mk: add stripped u-boot.elf support
Date: Tue, 22 Nov 2022 10:01:24 +0100	[thread overview]
Message-ID: <20221122100124.3a441eb7@booty> (raw)
In-Reply-To: <20221122053611.44757-1-neal.frager@amd.com>

Hello Neal,

On Mon, 21 Nov 2022 22:36:11 -0700
Neal Frager <neal.frager@amd.com> wrote:

> If a user requests a u-boot binary in elf format,
> they may actually want the stripped u-boot.elf version.
> This patch provides the stripped u-boot.elf binary.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
>   - reduced scope to only 64-bit ARM arch platforms
>   - non-ARM platforms may not have a u-boot.elf by default
> ---
>  boot/uboot/uboot.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index 0439ec5e4b..61b3074163 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -54,6 +54,9 @@ endif
>  
>  ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
>  UBOOT_BINS += u-boot
> +ifeq ($(BR2_aarch64),y)
> +UBOOT_BINS += u-boot.elf
> +endif

Is it really assured that all arm64 do build this file? And that
u-boot.elf is not useful for other architectures?

Looking at the U-Boot source code, it looks like this file is built if
CONFIG_REMAKE_ELF is enabled, which seems independent on the
architecture and happens for some non-arm64 defconfigs as well (e.g.
netgear_dgnd3700v2_ram_defconfig).

At first glance, it looks like we need (yet) another Kconfig knob in
Buildroot to manage this cleanly. Otherwise in
UBOOT_INSTALL_IMAGES_CMDS we might just install u-boot.elf if it is
present,skip it silently otherwise.

Not sure which solution is less appealing. :(

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-11-22  9:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  5:36 [Buildroot] [PATCH v2 1/1] boot/uboot/uboot.mk: add stripped u-boot.elf support Neal Frager via buildroot
2022-11-22  9:01 ` Luca Ceresoli via buildroot [this message]
2022-11-22  9:43   ` Frager, Neal via buildroot
2022-11-22 16:13     ` Thomas Petazzoni via buildroot
2022-11-22 18:07       ` Luca Ceresoli via buildroot
2022-11-22 20:47         ` Thomas Petazzoni via buildroot
2022-11-22 21:31           ` Luca Ceresoli via buildroot
2022-11-23  0:09             ` Frager, Neal via buildroot
2022-11-23 13:31               ` Thomas Petazzoni via buildroot
2022-11-23 14:06                 ` Frager, Neal via buildroot

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=20221122100124.3a441eb7@booty \
    --to=buildroot@buildroot.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=neal.frager@amd.com \
    --cc=thomas.petazzoni@bootlin.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