[coreboot-gerrit] New patch to review for coreboot: 9395939 build system: remove ROMSTAGE_ELF variable

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Sat Nov 29 11:52:25 CET 2014


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7611

-gerrit

commit 939593903951b4fa2f53cd38419bd721df73e58c
Author: Patrick Georgi <pgeorgi at google.com>
Date:   Sat Nov 29 11:51:25 2014 +0100

    build system: remove ROMSTAGE_ELF variable
    
    No need to keep that just because x86 has one
    extra linking step.
    
    Change-Id: Iffdbf64e0613f89070ed0dfb009379f5ca0bd3c1
    Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
 Makefile.inc              | 17 ++---------------
 src/arch/x86/Makefile.inc | 10 +++++-----
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 79392f4..a33eaf3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -602,24 +602,11 @@ cbfs-files-$(CONFIG_BOOTSPLASH) += bootsplash.jpg
 bootsplash.jpg-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE))
 bootsplash.jpg-type := bootsplash
 
-ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y)
-ROMSTAGE_ELF := romstage.elf
-endif
-ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM64),y)
-ROMSTAGE_ELF := romstage.elf
-endif
-ifeq ($(CONFIG_ARCH_ROMSTAGE_RISCV),y)
-ROMSTAGE_ELF := romstage.elf
-endif
-ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y)
-ROMSTAGE_ELF := romstage_xip.elf
-endif
-
-$(obj)/coreboot.pre: $(objcbfs)/$(ROMSTAGE_ELF) $(obj)/coreboot.pre1 $(CBFSTOOL)
+$(obj)/coreboot.pre: $(objcbfs)/romstage.elf $(obj)/coreboot.pre1 $(CBFSTOOL)
 	@printf "    CBFS       $(subst $(obj)/,,$(@))\n"
 	cp $(obj)/coreboot.pre1 $@.tmp
 	$(CBFSTOOL) $@.tmp add-stage \
-		-f $(objcbfs)/$(ROMSTAGE_ELF) \
+		-f $(objcbfs)/romstage.elf \
 		-n $(CONFIG_CBFS_PREFIX)/romstage -c none \
 		$(CBFSTOOL_PRE_OPTS)
 	mv $@.tmp $@
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index e66752e..2eaeeff 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -176,11 +176,11 @@ else
 	ROMCCFLAGS := -mcpu=i386 -O2 # !MMX, !SSE
 endif
 
-$(objcbfs)/romstage_%.bin: $(objcbfs)/romstage_%.elf
+$(objcbfs)/romstage%.bin: $(objcbfs)/romstage%.elf
 	@printf "    OBJCOPY    $(subst $(obj)/,,$(@))\n"
 	$(OBJCOPY_romstage) -O binary $< $@
 
-$(objcbfs)/romstage_%.elf: $(objcbfs)/romstage_%.debug
+$(objcbfs)/romstage%.elf: $(objcbfs)/romstage%.debug
 	@printf "    OBJCOPY    $(subst $(obj)/,,$(@))\n"
 	cp $< $@.tmp
 	$(OBJCOPY_romstage) --strip-debug $@.tmp
@@ -215,9 +215,9 @@ $(objcbfs)/romstage_null.debug: $$(romstage-objs) $(objgenerated)/romstage_null.
 		$(NM_romstage) $@ | grep " [DdBb] "; test "$(CONFIG_CPU_AMD_AGESA)" = y; \
 		else true; fi
 
-$(objcbfs)/romstage_xip.debug: $$(romstage-objs) $(objgenerated)/romstage_xip.ld $$(romstage-libs)
+$(objcbfs)/romstage.debug: $$(romstage-objs) $(objgenerated)/romstage.ld $$(romstage-libs)
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
-	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group $(romstage-objs) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage_xip.ld
+	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group $(romstage-objs) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage.ld
 
 $(objgenerated)/romstage_null.ld: $$(ldscripts) $(obj)/ldoptions
 	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
@@ -226,7 +226,7 @@ $(objgenerated)/romstage_null.ld: $$(ldscripts) $(obj)/ldoptions
 	printf '$(foreach ldscript,ldoptions $(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' >> $@.tmp
 	mv $@.tmp $@
 
-$(objgenerated)/romstage_xip.ld: $(objgenerated)/romstage_null.ld $(objcbfs)/base_xip.txt
+$(objgenerated)/romstage.ld: $(objgenerated)/romstage_null.ld $(objcbfs)/base_xip.txt
 	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
 	rm -f $@
 	sed -e 's/^/ROMSTAGE_BASE = /g' -e 's/$$/;/g' $(objcbfs)/base_xip.txt > $@.tmp



More information about the coreboot-gerrit mailing list