[Buildroot] [PATCH v1 1/1] boot/uboot/uboot.mk: add stripped u-boot.elf support

Frager, Neal neal.frager at amd.com
Mon Nov 21 18:28:25 UTC 2022


Hi Luca,

> Hello everyone,
> 
> Just a friendly reminder regarding this patch.  Any feedback?
> 
> 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 at amd.com>
> ---
>  boot/uboot/uboot.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 
> 0439ec5e4b..216efc5a13 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -53,7 +53,7 @@ UBOOT_BINS += u-boot.dtb  endif
>  
>  ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
> -UBOOT_BINS += u-boot
> +UBOOT_BINS += u-boot u-boot.elf

> This assumes BR2_TARGET_UBOOT_FORMAT_ELF will always result in building u-boot.elf, but I don't think this is true for all platforms.

> At a quick test with a RISC-V build and BR2_TARGET_UBOOT_FORMAT_ELF=y I got a failure with your patch applied because u-boot is produced but u-boot.elf isn't.

Do you know if all ARM 64-bit architectures generate a u-boot.elf by default?  

We could do this then:

ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
UBOOT_BINS += u-boot
# To make elf usable for debuging on ARC use special target
Ifeq ($(BR2_aarch64),y)
UBOOT_BINS += u-boot.elf
endif
ifeq ($(BR2_arc),y)
UBOOT_MAKE_TARGET += mdbtrick
endif
endif

What do you think?

Best regards,
Neal Frager
AMD

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 14604 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20221121/4ee0868b/attachment-0001.bin>


More information about the buildroot mailing list