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

Luca Ceresoli luca.ceresoli at bootlin.com
Tue Nov 22 18:07:43 UTC 2022


Hello Thomas,

On Tue, 22 Nov 2022 17:13:15 +0100
Thomas Petazzoni <thomas.petazzoni at bootlin.com> wrote:

> Hello Neal,
> 
> On Tue, 22 Nov 2022 09:43:45 +0000
> "Frager, Neal via buildroot" <buildroot at buildroot.org> wrote:
> 
> > Perhaps just checking every file for existence when running the loop below is the best option like below.  The idea is to keep this as simple as possible.  What do you think?
> > 
> > define UBOOT_INSTALL_IMAGES_CMDS
> > 	$(foreach f,$(UBOOT_BINS), \
> > 			$(if test -f $(@D)/$(f), \
> > 			cp -dpf $(@D)/$(f) $(BINARIES_DIR))/
> > 	)  
> 
> I think we should change:
> 
> config BR2_TARGET_UBOOT_FORMAT_ELF
>         bool "u-boot.elf"
> 
> to:
> 
> config BR2_TARGET_UBOOT_FORMAT_ELF
>         bool "u-boot"
> 
> (because this is really what it is doing)

Right.

> 
> and then introduce:
> 
> config BR2_TARGET_UBOOT_FORMAT_ELF_STRIPPED
>         bool "u-boot.elf"
> 
> which installs the stripped u-boot.elf file.
> 
> This way, BR2_TARGET_UBOOT_FORMAT_ELF_STRIPPED can be enabled on
> configurations that need it, without breaking configurations that
> provide u-boot but not u-boot.elf.

I agree with the principle you are proposing.

However, according to the U-Boot source code, u-boot.elf appears as
u-boot.bin repackaged into an ELF file. Is "stripped" a correct word
for this?

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list