From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 24 Feb 2018 20:49:38 +0100 Subject: [U-Boot] [PATCH 1/2] Makefile: add u-boot-elf.srec if CONFIG_REMAKE_ELF is defined In-Reply-To: <20180224191520.GN4311@bill-the-cat> References: <20180224112418.14203-1-marek.vasut+renesas@gmail.com> <20180224191520.GN4311@bill-the-cat> Message-ID: <262b5073-323d-e94b-33f9-be58ba5dcb91@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/24/2018 08:15 PM, Tom Rini wrote: > On Sat, Feb 24, 2018 at 12:24:17PM +0100, Marek Vasut wrote: > >> From: Masaru Nagai >> >> The u-boot-elf.srec is needed for some platforms, conveniently generate this file. >> >> Signed-off-by: Masaru Nagai >> Signed-off-by: Hiroyuki Yokoyama >> Signed-off-by: Marek Vasut >> Cc: Hiroyuki Yokoyama >> Cc: Nobuhiro Iwamatsu >> --- >> Makefile | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index 57cb4b87d9..cd464c0e69 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -792,7 +792,7 @@ ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb >> ifneq ($(CONFIG_SPL_TARGET),) >> ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) >> endif >> -ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf >> +ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf u-boot-elf.srec >> ALL-$(CONFIG_EFI_APP) += u-boot-app.efi >> ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi >> >> @@ -926,6 +926,11 @@ OBJCOPYFLAGS_u-boot.srec := -O srec >> u-boot.hex u-boot.srec: u-boot FORCE >> $(call if_changed,objcopy) >> >> +OBJCOPYFLAGS_u-boot-elf.srec := $(OBJCOPYFLAGS_u-boot.srec) >> + >> +u-boot-elf.srec: u-boot.elf FORCE >> + $(call if_changed,objcopy) >> + >> OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ >> $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) > > Do we really need the first hunk here, esp given that in 2/2 we make use > of CONFIG_BUILD_TARGET to say that we need to build u-boot-elf.srec? Probably not, but then we can very well convert platforms using REMAKE_ELF to CONFIG_BUILD_TARGET too ? -- Best regards, Marek Vasut