mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH] x86: efi: add IMD data to the EFI binary
Date: Fri,  3 Nov 2023 16:58:31 +0100	[thread overview]
Message-ID: <20231103155831.152488-1-m.olbrich@pengutronix.de> (raw)

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@pengutronix.de>
---
 arch/x86/Makefile                      | 2 +-
 arch/x86/mach-efi/elf_x86_64_efi.lds.S | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

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




             reply	other threads:[~2023-11-03 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 15:58 Michael Olbrich [this message]
2023-11-10 13:30 ` Sascha Hauer

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=20231103155831.152488-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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