[PATCH] x86: efi: add IMD data to the EFI binary

Sascha Hauer sha at pengutronix.de
Fri Nov 10 05:30:57 PST 2023


On Fri, Nov 03, 2023 at 04:58:31PM +0100, Michael Olbrich wrote:
> It it currently missing so the imd command and the bareboximd tool do
> not work.
> 
> Add the .barebox_imd section to the linker script and copy it to the EFI
> binary.
> 
> Signed-off-by: Michael Olbrich <m.olbrich at pengutronix.de>
> ---
>  arch/x86/Makefile                      | 2 +-
>  arch/x86/mach-efi/elf_x86_64_efi.lds.S | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index a0ce8c17f181..019c1adb7781 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -60,7 +60,7 @@ KBUILD_LDFLAGS := --no-undefined
>  
>  OBJCOPYFLAGS_barebox.efi = \
>  	-j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela \
> -	-j .reloc -j .bbenv.* -j .bblogo.* --target=$(TARGET)
> +	-j .reloc -j .bbenv.* -j .bblogo.* -j .barebox_imd --target=$(TARGET)
>  
>  barebox.efi: $(KBUILD_BINARY) FORCE
>  	$(call if_changed,objcopy)
> diff --git a/arch/x86/mach-efi/elf_x86_64_efi.lds.S b/arch/x86/mach-efi/elf_x86_64_efi.lds.S
> index ab4a9e815c00..52a0d3db2d6c 100644
> --- a/arch/x86/mach-efi/elf_x86_64_efi.lds.S
> +++ b/arch/x86/mach-efi/elf_x86_64_efi.lds.S
> @@ -56,6 +56,8 @@ SECTIONS
>  	}
>  	_edata = .;
>  
> +	.barebox_imd : { BAREBOX_IMD }
> +
>  	. = ALIGN(4096);
>  	.dynamic : { *(.dynamic) }
>  	. = ALIGN(4096);
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list