mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: barebox@lists.infradead.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 4/5] x86: reuse cmd_objcopy to generate barebox.efi
Date: Wed, 17 Nov 2021 12:49:17 +0900	[thread overview]
Message-ID: <20211117034918.1226358-5-masahiroy@kernel.org> (raw)
In-Reply-To: <20211117034918.1226358-1-masahiroy@kernel.org>

The objcopy rule is defined in scripts/Makefile.lib

Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/x86/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 5623b2cea..53cbd5088 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -54,17 +54,16 @@ common-y += arch/x86/lib/
 lds-$(CONFIG_X86_32)   := arch/x86/mach-efi/elf_ia32_efi.lds
 lds-$(CONFIG_X86_64)   := arch/x86/mach-efi/elf_x86_64_efi.lds
 
-quiet_cmd_efi_image = EFI-IMG $@
-      cmd_efi_image = $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
-		      -j .dynsym -j .rel -j .rela -j .reloc \
-		      -j .bbenv.* -j .bblogo.* --target=$(TARGET) $< $@
-
 KBUILD_BINARY := barebox
 
 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)
+
 barebox.efi: $(KBUILD_BINARY) FORCE
-	$(call if_changed,efi_image)
+	$(call if_changed,objcopy)
 
 KBUILD_IMAGE := barebox.efi
 
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-11-17  3:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  3:49 [PATCH 0/5] x86: misc cleanups Masahiro Yamada
2021-11-17  3:49 ` [PATCH 1/5] kbuild: remove unneeded -nostdlib flag Masahiro Yamada
2021-11-17  3:49 ` [PATCH 2/5] x86: remove x86-specific cmd_barebox__ Masahiro Yamada
2021-11-17  3:49 ` [PATCH 3/5] x86: stop copying unneeded sections to barebox.efi Masahiro Yamada
2021-11-17  3:49 ` Masahiro Yamada [this message]
2021-11-17  3:49 ` [PATCH 5/5] x86_64: do not pass the EFI image handle or system table to relocation Masahiro Yamada
2021-11-17  7:42 ` [PATCH 0/5] x86: misc cleanups 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=20211117034918.1226358-5-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --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