[coreboot-gerrit] New patch to review for coreboot: f7eda9b mips: Simplify architecture specific Makefile.inc

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Mar 30 13:58:34 CEST 2015


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

-gerrit

commit f7eda9be32a90e62701c11556afe30a5a35b4694
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Mon Mar 30 13:40:29 2015 +0200

    mips: Simplify architecture specific Makefile.inc
    
    The mips Makefile was inherited from x86 and so included lots
    of stuff that is necessary on x86 but nowhere else.
    That cruft is now gone.
    
    This is inspired by the commit listed below, but rewritten to match
    upstream, and split in smaller pieces to keep intent clear.
    
    Change-Id: Ibf0c7096f9425572d8f83837aa6a253fd91e212c
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
    Based-On-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
 src/arch/mips/Makefile.inc | 35 ++++-------------------------------
 1 file changed, 4 insertions(+), 31 deletions(-)

diff --git a/src/arch/mips/Makefile.inc b/src/arch/mips/Makefile.inc
index 42c3007..a5b6490 100644
--- a/src/arch/mips/Makefile.inc
+++ b/src/arch/mips/Makefile.inc
@@ -35,6 +35,8 @@ endif
 ifeq ($(CONFIG_ARCH_BOOTBLOCK_MIPS),y)
 
 bootblock-y += boot.c
+bootblock-y += bootblock.S
+bootblock-y += bootblock_simple.c
 bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += early_console.c
 bootblock-y += stages.c
 bootblock-y += timer.c
@@ -44,44 +46,15 @@ bootblock-y += ../../lib/memset.c
 
 bootblock_lds = $(src)/arch/mips/bootblock.ld
 
-bootblock_inc += $(src)/arch/mips/bootblock.S
-bootblock_inc += $(objgenerated)/bootblock.inc
-
 # Much of the assembly code is generated by the compiler, and may contain
 # terms which the preprocessor will happily go on to replace. For example
 # "mips" would be replaced with "1". Clear all the built in definitions to
 # prevent that.
 bootblock-S-ccopts += -undef
 
-$(objgenerated)/bootblock.ld: $$(bootblock_lds) $(obj)/ldoptions
-	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
-	printf '$(foreach ldscript,ldoptions $(bootblock_lds),INCLUDE "$(ldscript)"\n)' > $@
-
-$(objgenerated)/bootblock_inc.S: $$(bootblock_inc)
-	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
-	printf '$(foreach crt0,$(bootblock_inc),#include "$(crt0)"\n)' > $@
-
-$(objgenerated)/bootblock.o: $(objgenerated)/bootblock.s
-	@printf "    CC         $(subst $(obj)/,,$(@))\n"
-	$(CC_bootblock) $(bootblock-S-ccopts) -Wa,-acdlns -c -o $@ $<  > $(basename $@).disasm
-
-$(objgenerated)/bootblock.s: $(objgenerated)/bootblock_inc.S $(obj)/config.h $(obj)/build.h
-	@printf "    CC         $(subst $(obj)/,,$(@))\n"
-	$(CC_bootblock) $(bootblock-S-ccopts) -MMD -x assembler-with-cpp -E \
-			-I$(src)/include -I$(src)/arch/mips/include -I$(obj) \
-			-include $(obj)/build.h -include $(obj)/config.h -I. \
-			-I$(src) $< -o $@
-
-$(objgenerated)/bootblock.inc: $(src)/arch/mips/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(bootblock_custom) $(obj)/config.h
-	@printf "    CC      $(subst $(obj)/,,$(@))\n"
-	$(CC_bootblock) $(bootblock-c-ccopts) $(CFLAGS_bootblock) -MM \
-		-MT$(objgenerated)/bootblock.inc \
-		$< > $(objgenerated)/bootblock.inc.d
-	$(CC_bootblock) $(bootblock-c-ccopts) -c -S $(CFLAGS_bootblock) -I. $< -o $@
-
-$(objcbfs)/bootblock.debug:  $(objgenerated)/bootblock.o $(objgenerated)/bootblock.ld $$(bootblock-objs) $(obj)/config.h
+$(objcbfs)/bootblock.debug:  $(src)/arch/mips/bootblock.ld $$(bootblock-objs) $(obj)/config.h
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
-	$(CC_bootblock)  $(CFLAGS_bootblock) -nostdlib -Wl,--gc-sections -nostartfiles -include $(obj)/config.h -static -o $@ -L$(obj) -T $(objgenerated)/bootblock.ld -Wl,--start-group $(objgenerated)/bootblock.o $(bootblock-objs) -Wl,--end-group
+	$(LD_bootblock) --gc-sections -static -o $@ -L$(obj) -T $(src)/arch/mips/bootblock.ld --start-group $(bootblock-objs) --end-group
 
 endif # CONFIG_ARCH_BOOTBLOCK_MIPS
 



More information about the coreboot-gerrit mailing list