Move all the copies of the romstage.inc rule to
src/arch/i386/Makefile.inc For that to work, I had to: - Add a CONFIG_ROMCC variable - Set that variable on all ROMCC boards - conditionally choose romcc or gcc rule based on that variable - remove those two rules from all the boards' Makefiles - switch a couple of boards to HAVE_OPTION_TABLE, as they actually have. Also remove the duplication of rules with the sole difference of if they depend on option_table.h or not. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5099 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -49,6 +49,10 @@ config BIG_BOOTBLOCK
|
||||
default n if TINY_BOOTBLOCK
|
||||
default y
|
||||
|
||||
config ROMCC
|
||||
bool
|
||||
default n
|
||||
|
||||
config BOOTBLOCK_NORTHBRIDGE_INIT
|
||||
string
|
||||
|
||||
|
@@ -66,6 +66,27 @@ $(obj)/coreboot.a: $(objs)
|
||||
ifeq ($(crt0s),)
|
||||
$(error crt0s are empty. If your board still uses crt0-y and ldscript-y: It shouldn't, we moved away from that in r5065)
|
||||
endif
|
||||
|
||||
OPTION_TABLE_H:=
|
||||
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
|
||||
OPTION_TABLE_H:=$(obj)/option_table.h
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ROMCC),y)
|
||||
ROMCCFLAGS ?= -mcpu=p2 -O2
|
||||
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/failover.inc: $(obj)/romcc $(src)/arch/i386/lib/failover.c
|
||||
$(obj)/romcc $(ROMCCFLAGS) --label-prefix=failover $(INCLUDES) $(src)/arch/i386/lib/failover.c -o $@
|
||||
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/romcc $(OPTION_TABLE_H) $(obj)/build.h
|
||||
$(obj)/romcc $(ROMCCFLAGS) $(INCLUDES) $< -o $@
|
||||
|
||||
else
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h
|
||||
$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $< -o $@
|
||||
perl -e 's/\.rodata/.rom.data/g' -pi $@
|
||||
perl -e 's/\.text/.section .rom.text/g' -pi $@
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TINY_BOOTBLOCK),y)
|
||||
|
Reference in New Issue
Block a user