Rename build system variables to be more intuitive, and

at the same time let the user specify sources instead
of object files:
- objs becomes ramstage-srcs
- initobjs becomes romstage-srcs
- driver becomes driver-srcs
- smmobj becomes smm-srcs

The user servicable parts are named accordingly:
ramstage-y, romstage-y, driver-y, smm-y

Also, the object file names are properly renamed now, using
.ramstage.o, .romstage.o, .driver.o, .smm.o suffixes consistently.

Remove stubbed out via/epia-m700 dsdt/ssdt files - they didn't
easily fit in the build system and aren't useful anyway.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coreystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5886 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi 2010-09-30 16:55:02 +00:00
parent d4d0a456d3
commit 8463dd9db0
201 changed files with 660 additions and 712 deletions

105
Makefile
View File

@ -173,32 +173,35 @@ $(objutil)/%.o: $(objutil)/%.c
@printf " HOSTCC $(subst $(objutil)/,,$(@))\n" @printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
$(HOSTCC) -MMD -I$(subst $(objutil)/,util/,$(dir $<)) -I$(dir $<) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) -MMD -I$(subst $(objutil)/,util/,$(dir $<)) -I$(dir $<) $(HOSTCFLAGS) -c -o $@ $<
$(obj)/%.o: $(obj)/%.c $(obj)/config.h $(obj)/%.ramstage.o: $(obj)/%.c $(obj)/config.h
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -MMD $(CFLAGS) -c -o $@ $< $(CC) -MMD $(CFLAGS) -c -o $@ $<
objs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.o ramstage-srcs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
initobjs:= romstage-srcs:=
drivers:= driver-srcs:=
smmobjs:= smm-srcs:=
types:=obj initobj driver smmobj
ramstage-objs:=
romstage-objs:=
driver-objs:=
smm-objs:=
types:=ramstage romstage driver smm
# Clean -y variables, include Makefile.inc # Clean -y variables, include Makefile.inc
# If $(3) is non-empty, add paths to files in X-y, and add them to Xs # Add paths to files in X-y to X-srcs
# Add subdirs-y to subdirs # Add subdirs-y to subdirs
includemakefiles= \ includemakefiles= \
$(foreach type,$(2), $(eval $(type)-y:=)) \ $(foreach type,$(2), $(eval $(type)-y:=)) \
$(eval subdirs-y:=) \ $(eval subdirs-y:=) \
$(eval -include $(1)) \ $(eval -include $(1)) \
$(foreach type,$(2), \ $(foreach type,$(2), \
$(eval $(type)s+= \ $(eval $(type)-srcs+= \
$$(subst $(top)/,, \ $$(subst $(top)/,, \
$$(abspath $$(patsubst src/%, \ $$(abspath $$(addprefix $(dir $(1)),$$($(type)-y)))))) \
$(obj)/%, \
$$(addprefix $(dir $(1)),$$($(type)-y))))))) \
$(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y))))) $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
# For each path in $(subdirs) call includemakefiles, passing $(1) as $(3) # For each path in $(subdirs) call includemakefiles
# Repeat until subdirs is empty # Repeat until subdirs is empty
evaluate_subdirs= \ evaluate_subdirs= \
$(eval cursubdirs:=$(subdirs)) \ $(eval cursubdirs:=$(subdirs)) \
@ -211,70 +214,62 @@ evaluate_subdirs= \
subdirs:=$(PLATFORM-y) $(BUILD-y) subdirs:=$(PLATFORM-y) $(BUILD-y)
$(eval $(call evaluate_subdirs)) $(eval $(call evaluate_subdirs))
initobjs:=$(addsuffix .initobj.o, $(basename $(initobjs))) src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs))))
drivers:=$(addsuffix .driver.o, $(basename $(drivers)))
smmobjs:=$(addsuffix .smmobj.o, $(basename $(smmobjs)))
allobjs:=$(foreach var, $(addsuffix s,$(types)), $($(var))) ramstage-objs:=$(call src-to-obj,ramstage)
romstage-objs:=$(call src-to-obj,romstage)
driver-objs:=$(call src-to-obj,driver)
smm-objs:=$(call src-to-obj,smm)
allsrcs:=$(foreach var, $(addsuffix -srcs,$(types)), $($(var)))
allobjs:=$(foreach var, $(addsuffix -objs,$(types)), $($(var)))
alldirs:=$(sort $(abspath $(dir $(allobjs)))) alldirs:=$(sort $(abspath $(dir $(allobjs))))
source_with_ext=$(patsubst $(obj)/%.o,src/%.$(1),$(allobjs))
allsrc=$(wildcard $(call source_with_ext,c) $(call source_with_ext,S))
define objs_asl_template define ramstage-objs_asl_template
$(obj)/$(1)%.o: src/$(1)%.asl $(obj)/$(1).ramstage.o: src/$(1).asl
@printf " IASL $$(subst $(top)/,,$$(@))\n" @printf " IASL $$(subst $(top)/,,$$(@))\n"
$(CPP) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl $(CPP) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
iasl -p $$(basename $$@) -tc $$(basename $$@).asl iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl
mv $$(basename $$@).hex $$(basename $$@).c mv $$(obj)/$(1).hex $$(basename $$@).c
$(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
# keep %.o: %.c rule from catching the temporary .c file after a make clean # keep %.o: %.c rule from catching the temporary .c file after a make clean
mv $$(basename $$@).c $$(basename $$@).hex mv $$(basename $$@).c $$(basename $$@).hex
endef endef
# macro to define template macros that are used by use_template macro # macro to define template macros that are used by use_template macro
define create_cc_template define create_cc_template
# $1 obj class (objs, initobjs, ...) # $1 obj class (ramstage, romstage, driver, smm)
# $2 source suffix (c, S) # $2 source suffix (c, S)
# $3 .o infix ("" ".initobj", ...) # $3 additional compiler flags
# $4 additional compiler flags de$(EMPTY)fine $(1)-objs_$(2)_template
de$(EMPTY)fine $(1)_$(2)_template $(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h
$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) $(obj)/config.h
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" @printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
$(CC) $(4) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< $(CC) $(3) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$<
en$(EMPTY)def en$(EMPTY)def
endef endef
$(eval $(call create_cc_template,objs,c)) $(eval $(call create_cc_template,ramstage,c))
$(eval $(call create_cc_template,objs,S,,-DASSEMBLY)) $(eval $(call create_cc_template,ramstage,S,-DASSEMBLY))
$(eval $(call create_cc_template,initobjs,c,.initobj,-D__PRE_RAM__)) $(eval $(call create_cc_template,romstage,c,-D__PRE_RAM__))
$(eval $(call create_cc_template,initobjs,S,.initobj,-DASSEMBLY -D__PRE_RAM__)) $(eval $(call create_cc_template,romstage,S,-DASSEMBLY -D__PRE_RAM__))
$(eval $(call create_cc_template,drivers,c,.driver)) $(eval $(call create_cc_template,driver,c))
$(eval $(call create_cc_template,drivers,S,.driver,-DASSEMBLY)) $(eval $(call create_cc_template,driver,S,-DASSEMBLY))
$(eval $(call create_cc_template,smmobjs,c,.smmobj)) $(eval $(call create_cc_template,smm,c))
$(eval $(call create_cc_template,smmobjs,S,.smmobj)) $(eval $(call create_cc_template,smm,S))
usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d))))) foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file))))))
usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d))))) $(eval $(foreach type,$(types),$(call foreach-src,$(type))))
$(eval $(call usetemplate,objs,asl))
$(eval $(call usetemplate,objs,c))
$(eval $(call usetemplate,objs,S))
$(eval $(call usetemplate,initobjs,c))
$(eval $(call usetemplate,initobjs,S))
$(eval $(call usetemplate,drivers,c))
$(eval $(call usetemplate,drivers,S))
$(eval $(call usetemplate,smmobjs,c))
$(eval $(call usetemplate,smmobjs,S))
DEPENDENCIES = $(objs:.o=.d) $(initobjs:.o=.d) $(drivers:.o=.d) $(smmobjs:.o=.d) DEPENDENCIES = $(ramstage-objs:.o=.d) $(romstage-objs:.o=.d) $(driver-objs:.o=.d) $(smm-objs:.o=.d)
-include $(DEPENDENCIES) -include $(DEPENDENCIES)
printall: printall:
@echo objs:=$(objs) @echo ramstage-objs:=$(ramstage-objs)
@echo initobjs:=$(initobjs) @echo romstage-objs:=$(romstage-objs)
@echo drivers:=$(drivers) @echo driver-objs:=$(driver-objs)
@echo smmobjs:=$(smmobjs) @echo smm-objs:=$(smm-objs)
@echo alldirs:=$(alldirs) @echo alldirs:=$(alldirs)
@echo allsrc=$(allsrc) @echo allsrcs=$(allsrcs)
@echo DEPENDENCIES=$(DEPENDENCIES) @echo DEPENDENCIES=$(DEPENDENCIES)
@echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME) @echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME)
@ -343,7 +338,7 @@ doxygen-clean:
rm -rf $(DOXYGEN_OUTPUT_DIR) rm -rf $(DOXYGEN_OUTPUT_DIR)
clean-for-update: doxygen-clean clean-for-update: doxygen-clean
rm -f $(objs) $(initobjs) $(drivers) $(smmobjs) .xcompile rm -f $(ramstage-objs) $(romstage-objs) $(driver-objs) $(smm-objs) .xcompile
rm -f $(DEPENDENCIES) rm -f $(DEPENDENCIES)
rm -f $(obj)/coreboot_ram* $(obj)/coreboot.romstage $(obj)/coreboot.pre* $(obj)/coreboot.bootblock $(obj)/coreboot.a rm -f $(obj)/coreboot_ram* $(obj)/coreboot.romstage $(obj)/coreboot.pre* $(obj)/coreboot.bootblock $(obj)/coreboot.a
rm -rf $(obj)/bootblock* $(obj)/romstage* $(obj)/location.* rm -rf $(obj)/bootblock* $(obj)/romstage* $(obj)/location.*

View File

@ -20,7 +20,7 @@ $(obj)/crt0.S: $$(crt0s)
@printf " GEN $(subst $(obj)/,,$(@))\n" @printf " GEN $(subst $(obj)/,,$(@))\n"
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@ printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.romstage.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -MMD -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm $(CC) -MMD -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
@ -28,9 +28,9 @@ $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/crt0.S
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< -o $@ $(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< -o $@
$(obj)/coreboot: $$(initobjs) $(obj)/ldscript.ld $(obj)/coreboot: $$(romstage-objs) $(obj)/ldscript.ld
@printf " LINK $(subst $(obj)/,,$(@))\n" @printf " LINK $(subst $(obj)/,,$(@))\n"
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs) $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(romstage-objs)
$(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map $(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map
$(OBJCOPY) --only-keep-debug $@ $(obj)/bootblock.debug $(OBJCOPY) --only-keep-debug $@ $(obj)/bootblock.debug
$(OBJCOPY) --strip-debug $@ $(OBJCOPY) --strip-debug $@

View File

@ -81,16 +81,16 @@ $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootbl
####################################################################### #######################################################################
# Build the romstage # Build the romstage
$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(initobjs) $(obj)/romstage/ldscript.ld $(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(romstage-objs) $(obj)/romstage/ldscript.ld
@printf " LINK $(subst $(obj)/,,$(@))\n" @printf " LINK $(subst $(obj)/,,$(@))\n"
printf "CONFIG_ROMBASE = 0x0;\nAUTO_XIP_ROM_BASE = 0x0;\n" > $(obj)/location.ld printf "CONFIG_ROMBASE = 0x0;\nAUTO_XIP_ROM_BASE = 0x0;\n" > $(obj)/location.ld
$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(initobjs) $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
$(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin $(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
cat $(obj)/location.txt >> $(obj)/location.ld cat $(obj)/location.txt >> $(obj)/location.ld
printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld
$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(initobjs) $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
$(NM) -n $(obj)/romstage.elf | sort > $(obj)/romstage.map $(NM) -n $(obj)/romstage.elf | sort > $(obj)/romstage.map
$(OBJCOPY) --only-keep-debug $(obj)/romstage.elf $(obj)/romstage.debug $(OBJCOPY) --only-keep-debug $(obj)/romstage.elf $(obj)/romstage.debug
$(OBJCOPY) --strip-debug $(obj)/romstage.elf $(OBJCOPY) --strip-debug $(obj)/romstage.elf
@ -107,7 +107,7 @@ $(obj)/romstage/crt0.S: $$(crt0s)
mkdir -p $(obj)/romstage mkdir -p $(obj)/romstage
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@ printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.romstage.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm $(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm

View File

@ -25,7 +25,11 @@ subdirs-y += boot
subdirs-y += lib subdirs-y += lib
subdirs-y += smp subdirs-y += smp
obj-$(CONFIG_HAVE_OPTION_TABLE) += ../../option_table.o OPTION_TABLE_H:=
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
ramstage-srcs += $(obj)/option_table.c
OPTION_TABLE_H:=$(obj)/option_table.h
endif
####################################################################### #######################################################################
# Build the final rom image # Build the final rom image
@ -88,13 +92,13 @@ endif
####################################################################### #######################################################################
# i386 specific tools # i386 specific tools
$(obj)/option_table.h: $(objutil)/options/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout $(OPTION_TABLE_H): $(objutil)/options/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
@printf " OPTION $(subst $(obj)/,,$(@))\n" @printf " OPTION $(subst $(obj)/,,$(@))\n"
$(objutil)/options/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --header $(obj)/option_table.h $(objutil)/options/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --header $@
$(obj)/option_table.c: $(objutil)/options/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout $(obj)/option_table.c: $(objutil)/options/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
@printf " OPTION $(subst $(obj)/,,$(@))\n" @printf " OPTION $(subst $(obj)/,,$(@))\n"
$(objutil)/options/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --option $(obj)/option_table.c $(objutil)/options/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --option $@
$(objutil)/options/build_opt_tbl: $(top)/util/options/build_opt_tbl.c $(top)/src/include/pc80/mc146818rtc.h $(top)/src/include/boot/coreboot_tables.h $(objutil)/options/build_opt_tbl: $(top)/util/options/build_opt_tbl.c $(top)/src/include/pc80/mc146818rtc.h $(top)/src/include/boot/coreboot_tables.h
@printf " HOSTCC $(subst $(obj)/,,$(@))\n" @printf " HOSTCC $(subst $(obj)/,,$(@))\n"
@ -111,11 +115,11 @@ $(obj)/coreboot_ram: $(obj)/coreboot_ram.o $(src)/arch/i386/coreboot_ram.ld #ldo
$(OBJCOPY) --strip-debug $@ $(OBJCOPY) --strip-debug $@
$(OBJCOPY) --add-gnu-debuglink=$(obj)/coreboot_ram.debug $@ $(OBJCOPY) --add-gnu-debuglink=$(obj)/coreboot_ram.debug $@
$(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $$(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME) $(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.ramstage.o $$(driver-objs) $(obj)/coreboot.a $(LIBGCC_FILE_NAME)
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.o $(drivers) -Wl,--wrap,__divdi3 -Wl,--wrap,__udivdi3 -Wl,--wrap,__moddi3 -Wl,--wrap,__umoddi3 -Wl,--start-group $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,--end-group $(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.ramstage.o $(driver-objs) -Wl,--wrap,__divdi3 -Wl,--wrap,__udivdi3 -Wl,--wrap,__moddi3 -Wl,--wrap,__umoddi3 -Wl,--start-group $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,--end-group
$(obj)/coreboot.a: $$(objs) $(obj)/coreboot.a: $$(ramstage-objs)
@printf " AR $(subst $(obj)/,,$(@))\n" @printf " AR $(subst $(obj)/,,$(@))\n"
rm -f $(obj)/coreboot.a rm -f $(obj)/coreboot.a
$(AR) cr $(obj)/coreboot.a $^ $(AR) cr $(obj)/coreboot.a $^
@ -191,11 +195,6 @@ ifeq ($(CONFIG_ROMCC),y)
crt0s += $(src)/arch/i386/init/crt0_romcc_epilogue.inc crt0s += $(src)/arch/i386/init/crt0_romcc_epilogue.inc
endif endif
OPTION_TABLE_H:=
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
OPTION_TABLE_H:=$(obj)/option_table.h
endif
ifeq ($(CONFIG_ROMCC),y) ifeq ($(CONFIG_ROMCC),y)
ROMCCFLAGS ?= -mcpu=p2 -O2 ROMCCFLAGS ?= -mcpu=p2 -O2
@ -219,36 +218,36 @@ $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/
endif endif
# Things that appear in every board # Things that appear in every board
initobjs += $(obj)/mainboard/$(MAINBOARDDIR)/crt0.o romstage-srcs += $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
objs += $(obj)/mainboard/$(MAINBOARDDIR)/mainboard.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
ifeq ($(CONFIG_GENERATE_MP_TABLE),y) ifeq ($(CONFIG_GENERATE_MP_TABLE),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/mptable.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mptable.c
endif endif
ifeq ($(CONFIG_GENERATE_PIRQ_TABLE),y) ifeq ($(CONFIG_GENERATE_PIRQ_TABLE),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/irq_tables.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/irq_tables.c
endif endif
ifeq ($(CONFIG_BOARD_HAS_HARD_RESET),y) ifeq ($(CONFIG_BOARD_HAS_HARD_RESET),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/reset.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/reset.c
endif endif
ifeq ($(CONFIG_GENERATE_ACPI_TABLES),y) ifeq ($(CONFIG_GENERATE_ACPI_TABLES),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/acpi_tables.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/acpi_tables.c
objs += $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/dsdt.asl
# make doesn't have arithmetic operators or greater-than comparisons # make doesn't have arithmetic operators or greater-than comparisons
ifeq ($(subst 5,4,$(CONFIG_ACPI_SSDTX_NUM)),4) ifeq ($(subst 5,4,$(CONFIG_ACPI_SSDTX_NUM)),4)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt2.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/ssdt2.asl
objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt3.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/ssdt3.asl
objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt4.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/ssdt4.asl
endif endif
ifeq ($(CONFIG_ACPI_SSDTX_NUM),5) ifeq ($(CONFIG_ACPI_SSDTX_NUM),5)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt5.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/ssdt5.asl
endif endif
ifeq ($(CONFIG_BOARD_HAS_FADT),y) ifeq ($(CONFIG_BOARD_HAS_FADT),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/fadt.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/fadt.c
endif endif
endif endif
ifeq ($(CONFIG_HAVE_BUS_CONFIG),y) ifeq ($(CONFIG_HAVE_BUS_CONFIG),y)
objs += $(obj)/mainboard/$(MAINBOARDDIR)/get_bus_conf.o ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/get_bus_conf.c
endif endif
ifeq ($(CONFIG_TINY_BOOTBLOCK),y) ifeq ($(CONFIG_TINY_BOOTBLOCK),y)

View File

@ -1,13 +1,13 @@
obj-y += boot.o ramstage-y += boot.c
obj-y += coreboot_table.o ramstage-y += coreboot_table.c
obj-$(CONFIG_MULTIBOOT) += multiboot.o ramstage-$(CONFIG_MULTIBOOT) += multiboot.c
obj-y += gdt.o ramstage-y += gdt.c
obj-y += tables.o ramstage-y += tables.c
obj-$(CONFIG_GENERATE_MP_TABLE) += mpspec.o ramstage-$(CONFIG_GENERATE_MP_TABLE) += mpspec.c
obj-$(CONFIG_GENERATE_PIRQ_TABLE) += pirq_routing.o ramstage-$(CONFIG_GENERATE_PIRQ_TABLE) += pirq_routing.c
obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi.o ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += acpi.c
obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpigen.o ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += acpigen.c
obj-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.o ramstage-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.S
$(obj)/arch/i386/boot/coreboot_table.o : $(OPTION_TABLE_H) $(obj)/arch/i386/boot/coreboot_table.ramstage.o : $(OPTION_TABLE_H)

View File

@ -1,13 +1,13 @@
obj-y += c_start.o ramstage-y += c_start.S
obj-y += cpu.o ramstage-y += cpu.c
obj-y += pci_ops_conf1.o ramstage-y += pci_ops_conf1.c
obj-y += pci_ops_conf2.o ramstage-y += pci_ops_conf2.c
obj-y += pci_ops_mmconf.o ramstage-y += pci_ops_mmconf.c
obj-y += pci_ops_auto.o ramstage-y += pci_ops_auto.c
obj-y += exception.o ramstage-y += exception.c
obj-$(CONFIG_IOAPIC) += ioapic.o ramstage-$(CONFIG_IOAPIC) += ioapic.c
initobj-y += printk_init.o romstage-y += printk_init.c
initobj-y += cbfs_and_run.o romstage-y += cbfs_and_run.c
$(obj)/arch/i386/lib/console.o :: $(obj)/build.h $(obj)/arch/i386/lib/console.ramstage.o :: $(obj)/build.h

View File

@ -1,2 +1,2 @@
obj-y += hardwaremain.o ramstage-y += hardwaremain.c
obj-y += selfboot.o ramstage-y += selfboot.c

View File

@ -1,21 +1,21 @@
obj-y += printk.o ramstage-y += printk.c
obj-y += console.o ramstage-y += console.c
obj-y += vtxprintf.o ramstage-y += vtxprintf.c
obj-y += vsprintf.o ramstage-y += vsprintf.c
smmobj-y += printk.o smm-y += printk.c
smmobj-y += vtxprintf.o smm-y += vtxprintf.c
initobj-y += vtxprintf.o romstage-y += vtxprintf.c
initobj-$(CONFIG_CACHE_AS_RAM) += console.o romstage-$(CONFIG_CACHE_AS_RAM) += console.c
driver-$(CONFIG_CONSOLE_SERIAL8250) += uart8250_console.o driver-$(CONFIG_CONSOLE_SERIAL8250) += uart8250_console.c
driver-$(CONFIG_USBDEBUG) += usbdebug_console.o driver-$(CONFIG_USBDEBUG) += usbdebug_console.c
driver-$(CONFIG_CONSOLE_VGA) += vga_console.o driver-$(CONFIG_CONSOLE_VGA) += vga_console.c
driver-$(CONFIG_CONSOLE_BTEXT) += btext_console.o driver-$(CONFIG_CONSOLE_BTEXT) += btext_console.c
driver-$(CONFIG_CONSOLE_BTEXT) += font-8x16.o driver-$(CONFIG_CONSOLE_BTEXT) += font-8x16.c
driver-$(CONFIG_CONSOLE_LOGBUF) += logbuf_console.o driver-$(CONFIG_CONSOLE_LOGBUF) += logbuf_console.c
driver-$(CONFIG_CONSOLE_NE2K) += ne2k_console.o driver-$(CONFIG_CONSOLE_NE2K) += ne2k_console.c
$(obj)/console/console.o : $(obj)/build.h $(obj)/console/console.ramstage.o : $(obj)/build.h
$(obj)/console/console.initobj.o : $(obj)/build.h $(obj)/console/console.romstage.o : $(obj)/build.h

View File

@ -1,2 +1,2 @@
# This is a leaf Makefile, no conditionals. If it is included it will be used. # This is a leaf Makefile, no conditionals. If it is included it will be used.
obj-y += amd_sibling.o ramstage-y += amd_sibling.c

View File

@ -1 +1 @@
obj-y += microcode.o ramstage-y += microcode.c

View File

@ -1,5 +1,5 @@
# no conditionals here. If you include this file from a socket, then you get all the binaries. # no conditionals here. If you include this file from a socket, then you get all the binaries.
driver-y += model_10xxx_init.o driver-y += model_10xxx_init.c
obj-y += update_microcode.o ramstage-y += update_microcode.c
obj-y += apic_timer.o ramstage-y += apic_timer.c
obj-y += processor_name.o ramstage-y += processor_name.c

View File

@ -1,6 +1,6 @@
# no conditionals here. If you include this file from a socket, then you get all the binaries. # no conditionals here. If you include this file from a socket, then you get all the binaries.
driver-y += model_fxx_init.o driver-y += model_fxx_init.c
obj-y += apic_timer.o ramstage-y += apic_timer.c
obj-y += model_fxx_update_microcode.o ramstage-y += model_fxx_update_microcode.c
obj-y += processor_name.o ramstage-y += processor_name.c
obj-y += powernow_acpi.o ramstage-y += powernow_acpi.c

View File

@ -22,7 +22,7 @@ subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/lapic subdirs-y += ../../x86/lapic
subdirs-y += ../../x86/cache subdirs-y += ../../x86/cache
subdirs-y += ../../x86/smm subdirs-y += ../../x86/smm
driver-y += model_gx1_init.o driver-y += model_gx1_init.c
cpu_incs += $(src)/cpu/amd/model_gx1/cpu_setup.inc cpu_incs += $(src)/cpu/amd/model_gx1/cpu_setup.inc
cpu_incs += $(src)/cpu/amd/model_gx1/gx_setup.inc cpu_incs += $(src)/cpu/amd/model_gx1/gx_setup.inc

View File

@ -3,7 +3,7 @@ subdirs-y += ../../x86/lapic
subdirs-y += ../../x86/cache subdirs-y += ../../x86/cache
subdirs-y += ../../x86/smm subdirs-y += ../../x86/smm
driver-y += model_gx2_init.o driver-y += model_gx2_init.c
obj-y += cpubug.o ramstage-y += cpubug.c
cpu_incs += $(src)/cpu/amd/model_gx2/cache_as_ram.inc cpu_incs += $(src)/cpu/amd/model_gx2/cache_as_ram.inc

View File

@ -3,7 +3,7 @@ subdirs-y += ../../x86/lapic
subdirs-y += ../../x86/cache subdirs-y += ../../x86/cache
subdirs-y += ../../x86/smm subdirs-y += ../../x86/smm
driver-y += model_lx_init.o driver-y += model_lx_init.c
obj-y += cpubug.o ramstage-y += cpubug.c
cpu_incs += $(src)/cpu/amd/model_lx/cache_as_ram.inc cpu_incs += $(src)/cpu/amd/model_lx/cache_as_ram.inc

View File

@ -1 +1 @@
obj-y += amd_mtrr.o ramstage-y += amd_mtrr.c

View File

@ -1 +1 @@
obj-y += amd_sibling.o ramstage-y += amd_sibling.c

View File

@ -1 +1 @@
obj-y += sc520.o ramstage-y += sc520.c

View File

@ -1,4 +1,4 @@
obj-y += socket_754.o ramstage-y += socket_754.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_939.o ramstage-y += socket_939.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_940.o ramstage-y += socket_940.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_AM2.o ramstage-y += socket_AM2.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_AM2r2.o ramstage-y += socket_AM2r2.c
subdirs-y += ../model_10xxx subdirs-y += ../model_10xxx
subdirs-y += ../quadcore subdirs-y += ../quadcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_AM3.o ramstage-y += socket_AM3.c
subdirs-y += ../model_10xxx subdirs-y += ../model_10xxx
subdirs-y += ../quadcore subdirs-y += ../quadcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_ASB2.o ramstage-y += socket_ASB2.c
subdirs-y += ../model_10xxx subdirs-y += ../model_10xxx
subdirs-y += ../quadcore subdirs-y += ../quadcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_F.o ramstage-y += socket_F.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_F_1207.o ramstage-y += socket_F_1207.c
subdirs-y += ../model_10xxx subdirs-y += ../model_10xxx
subdirs-y += ../quadcore subdirs-y += ../quadcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_S1G1.o ramstage-y += socket_S1G1.c
subdirs-y += ../model_fxx subdirs-y += ../model_fxx
subdirs-y += ../dualcore subdirs-y += ../dualcore
subdirs-y += ../mtrr subdirs-y += ../mtrr

View File

@ -1,4 +1,4 @@
obj-y += bga956.o ramstage-y += bga956.c
subdirs-y += ../model_1067x subdirs-y += ../model_1067x
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -1,5 +1,5 @@
obj-y += ep80579.o ramstage-y += ep80579.c
driver-y += ep80579_init.o driver-y += ep80579_init.c
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr
subdirs-y += ../../x86/lapic subdirs-y += ../../x86/lapic

View File

@ -1 +1 @@
obj-y += intel_sibling.o ramstage-y += intel_sibling.c

View File

@ -1 +1 @@
obj-y += microcode.o ramstage-y += microcode.c

View File

@ -1,3 +1,3 @@
driver-y += model_1067x_init.o driver-y += model_1067x_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name

View File

@ -1,4 +1,4 @@
driver-y += model_106cx_init.o driver-y += model_106cx_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name
cpu_incs += $(src)/cpu/intel/model_106cx/cache_as_ram.inc cpu_incs += $(src)/cpu/intel/model_106cx/cache_as_ram.inc

View File

@ -18,6 +18,6 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
driver-y += model_68x_init.o driver-y += model_68x_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name

View File

@ -1 +1 @@
driver-y += model_69x_init.o driver-y += model_69x_init.c

View File

@ -1,2 +1,2 @@
driver-y += model_6bx_init.o driver-y += model_6bx_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name

View File

@ -1 +1 @@
driver-y += model_6dx_init.o driver-y += model_6dx_init.c

View File

@ -1,4 +1,4 @@
driver-y += model_6ex_init.o driver-y += model_6ex_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name
cpu_incs += $(src)/cpu/intel/model_6ex/cache_as_ram.inc cpu_incs += $(src)/cpu/intel/model_6ex/cache_as_ram.inc

View File

@ -1,2 +1,2 @@
driver-y += model_6fx_init.o driver-y += model_6fx_init.c
subdirs-y += ../../x86/name subdirs-y += ../../x86/name

View File

@ -1 +1 @@
driver-y += model_6xx_init.o driver-y += model_6xx_init.c

View File

@ -1 +1 @@
driver-y += model_f0x_init.o driver-y += model_f0x_init.c

View File

@ -1 +1 @@
driver-y += model_f1x_init.o driver-y += model_f1x_init.c

View File

@ -1 +1 @@
driver-y += model_f2x_init.o driver-y += model_f2x_init.c

View File

@ -1 +1 @@
driver-y += model_f3x_init.o driver-y += model_f3x_init.c

View File

@ -1 +1 @@
driver-y += model_f4x_init.o driver-y += model_f4x_init.c

View File

@ -18,7 +18,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += slot_1.o ramstage-y += slot_1.c
subdirs-y += ../model_6xx subdirs-y += ../model_6xx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -18,7 +18,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += slot_2.o ramstage-y += slot_2.c
subdirs-y += ../model_6xx subdirs-y += ../model_6xx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_441.o ramstage-y += socket_441.c
subdirs-y += ../model_106cx subdirs-y += ../model_106cx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -18,7 +18,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += socket_FC_PGA370.o ramstage-y += socket_FC_PGA370.c
subdirs-y += ../model_68x subdirs-y += ../model_68x
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -18,7 +18,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += socket_PGA370.o ramstage-y += socket_PGA370.c
subdirs-y += ../model_6xx subdirs-y += ../model_6xx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_mFCBGA479.o ramstage-y += socket_mFCBGA479.c
subdirs-y += ../model_6bx subdirs-y += ../model_6bx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc
subdirs-y += ../../x86/mtrr subdirs-y += ../../x86/mtrr

View File

@ -1,4 +1,4 @@
obj-y += socket_mFCPGA478.o ramstage-y += socket_mFCPGA478.c
subdirs-y += ../model_69x subdirs-y += ../model_69x
subdirs-y += ../model_6dx subdirs-y += ../model_6dx
subdirs-y += ../model_6ex subdirs-y += ../model_6ex

View File

@ -1,4 +1,4 @@
obj-y += socket_mPGA478.o ramstage-y += socket_mPGA478.c
subdirs-y += ../model_69x subdirs-y += ../model_69x
subdirs-y += ../model_6dx subdirs-y += ../model_6dx
subdirs-y += ../../x86/tsc subdirs-y += ../../x86/tsc

View File

@ -1,4 +1,4 @@
obj-y += socket_mPGA479M.o ramstage-y += socket_mPGA479M.c
subdirs-y += ../model_69x subdirs-y += ../model_69x
subdirs-y += ../model_6dx subdirs-y += ../model_6dx
subdirs-y += ../model_f2x subdirs-y += ../model_f2x
@ -10,4 +10,4 @@ subdirs-y += ../../x86/smm
subdirs-y += ../microcode subdirs-y += ../microcode
subdirs-y += ../hyperthreading subdirs-y += ../hyperthreading
cpu_incs += $(src)/cpu/intel/car/cache_as_ram.inc cpu_incs += $(src)/cpu/intel/car/cache_as_ram.inc

View File

@ -1,4 +1,4 @@
obj-y += socket_mPGA603_400Mhz.o ramstage-y += socket_mPGA603_400Mhz.c
subdirs-y += ../model_f0x subdirs-y += ../model_f0x
subdirs-y += ../model_f1x subdirs-y += ../model_f1x
subdirs-y += ../model_f2x subdirs-y += ../model_f2x

View File

@ -1,4 +1,4 @@
obj-y += socket_mPGA604.o ramstage-y += socket_mPGA604.c
subdirs-y += ../model_f2x subdirs-y += ../model_f2x
subdirs-y += ../model_f3x subdirs-y += ../model_f3x
subdirs-y += ../model_f4x subdirs-y += ../model_f4x

View File

@ -1 +1 @@
obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi.o ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += acpi.c

View File

@ -5,4 +5,4 @@ subdirs-y += ../../x86/cache
subdirs-y += ../../x86/smm subdirs-y += ../../x86/smm
subdirs-y += ../../intel/microcode subdirs-y += ../../intel/microcode
driver-y += model_c3_init.o driver-y += model_c3_init.c

View File

@ -5,6 +5,6 @@ subdirs-y += ../../x86/cache
subdirs-y += ../../x86/smm subdirs-y += ../../x86/smm
subdirs-y += ../../intel/microcode subdirs-y += ../../intel/microcode
driver-y += model_c7_init.o driver-y += model_c7_init.c
cpu_incs += $(src)/cpu/via/car/cache_as_ram.inc cpu_incs += $(src)/cpu/via/car/cache_as_ram.inc

View File

@ -1 +1 @@
obj-y += cache.o ramstage-y += cache.c

View File

@ -1,4 +1,4 @@
obj-y += lapic.o ramstage-y += lapic.c
obj-y += lapic_cpu_init.o ramstage-y += lapic_cpu_init.c
obj-y += secondary.o ramstage-y += secondary.S
obj-$(CONFIG_UDELAY_LAPIC) += apic_timer.o ramstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c

View File

@ -1 +1 @@
obj-y += mtrr.o ramstage-y += mtrr.c

View File

@ -17,5 +17,5 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += name.o ramstage-y += name.c

View File

@ -1 +1 @@
obj-y += pgtbl.o ramstage-y += pgtbl.c

View File

@ -17,24 +17,26 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.o ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.S
obj-$(CONFIG_HAVE_SMI_HANDLER) += smm_wrap.o ifeq ($(CONFIG_HAVE_SMI_HANDLER),y)
ramstage-srcs += $(obj)/cpu/x86/smm/smm_wrap
endif
smmobj-y += smmhandler.o smm-y += smmhandler.S
smmobj-y += smihandler.o smm-y += smihandler.c
smmobj-y += smiutil.o smm-y += smiutil.c
$(obj)/cpu/x86/smm/smm.o: $$(smmobjs) $(obj)/cpu/x86/smm/smm.o: $$(smm-objs)
$(CC) $(LDFLAGS) -nostdlib -r -o $@ $^ $(CC) $(LDFLAGS) -nostdlib -r -o $@ $^
$(obj)/cpu/x86/smm/smm: $(obj)/cpu/x86/smm/smm.o $(src)/cpu/x86/smm/smm.ld $(obj)/ldoptions $(obj)/cpu/x86/smm/smm_wrap: $(obj)/cpu/x86/smm/smm.o $(src)/cpu/x86/smm/smm.ld $(obj)/ldoptions
$(CC) $(LDFLAGS) -nostdlib -nostartfiles -static -o $(obj)/cpu/x86/smm/smm.elf -T $(src)/cpu/x86/smm/smm.ld $(obj)/cpu/x86/smm/smm.o $(CC) $(LDFLAGS) -nostdlib -nostartfiles -static -o $(obj)/cpu/x86/smm/smm.elf -T $(src)/cpu/x86/smm/smm.ld $(obj)/cpu/x86/smm/smm.o
$(NM) -n $(obj)/cpu/x86/smm/smm.elf | sort > $(obj)/cpu/x86/smm/smm.map $(NM) -n $(obj)/cpu/x86/smm/smm.elf | sort > $(obj)/cpu/x86/smm/smm.map
$(OBJCOPY) -O binary $(obj)/cpu/x86/smm/smm.elf $(obj)/cpu/x86/smm/smm $(OBJCOPY) -O binary $(obj)/cpu/x86/smm/smm.elf $(obj)/cpu/x86/smm/smm
# change to the target path because objcopy will use the path name in its # change to the target path because objcopy will use the path name in its
# ELF symbol names. # ELF symbol names.
$(obj)/cpu/x86/smm/smm_wrap.o: $(obj)/cpu/x86/smm/smm $(obj)/cpu/x86/smm/smm_wrap.ramstage.o: $(obj)/cpu/x86/smm/smm_wrap
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n" @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
cd $(obj)/cpu/x86/smm; $(OBJCOPY) -I binary smm -O elf32-i386 -B i386 smm_wrap.o cd $(obj)/cpu/x86/smm; $(OBJCOPY) -I binary smm -O elf32-i386 -B i386 smm_wrap.ramstage.o

View File

@ -1,2 +1,2 @@
obj-$(CONFIG_UDELAY_TSC) += delay_tsc.o ramstage-$(CONFIG_UDELAY_TSC) += delay_tsc.c

View File

@ -1,21 +1,21 @@
obj-y += device.o ramstage-y += device.c
obj-y += root_device.o ramstage-y += root_device.c
obj-y += device_util.o ramstage-y += device_util.c
obj-y += pci_device.o ramstage-y += pci_device.c
obj-$(CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT) += hypertransport.o ramstage-$(CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT) += hypertransport.c
obj-y += pcix_device.o ramstage-y += pcix_device.c
obj-y += pciexp_device.o ramstage-y += pciexp_device.c
obj-y += agp_device.o ramstage-y += agp_device.c
obj-y += cardbus_device.o ramstage-y += cardbus_device.c
obj-y += pnp_device.o ramstage-y += pnp_device.c
obj-y += pci_ops.o ramstage-y += pci_ops.c
obj-y += smbus_ops.o ramstage-y += smbus_ops.c
subdirs-y += oprom subdirs-y += oprom
ifeq ($(CONFIG_PCI_ROM_RUN),y) ifeq ($(CONFIG_PCI_ROM_RUN),y)
obj-y += pci_rom.o ramstage-y += pci_rom.c
else else
obj-$(CONFIG_VGA_ROM_RUN) += pci_rom.o ramstage-$(CONFIG_VGA_ROM_RUN) += pci_rom.c
endif endif

View File

@ -17,9 +17,9 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86.o ramstage-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86.c
obj-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86_asm.o ramstage-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86_asm.S
obj-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86_interrupts.o ramstage-$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) += x86_interrupts.c
subdirs-$(CONFIG_PCI_OPTION_ROM_RUN_YABEL) += x86emu subdirs-$(CONFIG_PCI_OPTION_ROM_RUN_YABEL) += x86emu
subdirs-$(CONFIG_PCI_OPTION_ROM_RUN_YABEL) += yabel subdirs-$(CONFIG_PCI_OPTION_ROM_RUN_YABEL) += yabel

View File

@ -1,7 +1,7 @@
obj-y += debug.o ramstage-y += debug.c
obj-y += decode.o ramstage-y += decode.c
obj-y += fpu.o ramstage-y += fpu.c
obj-y += ops.o ramstage-y += ops.c
obj-y += ops2.o ramstage-y += ops2.c
obj-y += prim_ops.o ramstage-y += prim_ops.c
obj-y += sys.o ramstage-y += sys.c

View File

@ -1,9 +1,9 @@
obj-y += biosemu.o ramstage-y += biosemu.c
obj-y += debug.o ramstage-y += debug.c
obj-y += device.o ramstage-y += device.c
obj-y += interrupt.o ramstage-y += interrupt.c
obj-y += io.o ramstage-y += io.c
obj-y += mem.o ramstage-y += mem.c
obj-y += pmm.o ramstage-y += pmm.c
obj-y += vbe.o ramstage-y += vbe.c
subdirs-y += compat subdirs-y += compat

View File

@ -1 +1 @@
obj-y += functions.o ramstage-y += functions.c

View File

@ -1 +1 @@
driver-$(CONFIG_ATI_RAGE_XL) += xlinit.o driver-$(CONFIG_ATI_RAGE_XL) += xlinit.c

View File

@ -1,2 +1,2 @@
driver-y += 21143.o driver-y += 21143.c

View File

@ -1 +1 @@
obj-$(CONFIG_DRIVERS_GENERIC_DEBUG) += debug_dev.o ramstage-$(CONFIG_DRIVERS_GENERIC_DEBUG) += debug_dev.c

View File

@ -1 +1 @@
driver-$(CONFIG_DRIVERS_SIL_3114) += sil_sata.o driver-$(CONFIG_DRIVERS_SIL_3114) += sil_sata.c

View File

@ -1,37 +1,37 @@
obj-y += clog2.o ramstage-y += clog2.c
obj-y += uart8250.o ramstage-y += uart8250.c
obj-y += memset.o ramstage-y += memset.c
obj-y += memcpy.o ramstage-y += memcpy.c
obj-y += memcmp.o ramstage-y += memcmp.c
obj-y += memmove.o ramstage-y += memmove.c
obj-y += malloc.o ramstage-y += malloc.c
obj-y += delay.o ramstage-y += delay.c
obj-y += fallback_boot.o ramstage-y += fallback_boot.c
obj-y += compute_ip_checksum.o ramstage-y += compute_ip_checksum.c
obj-y += version.o ramstage-y += version.c
obj-y += cbfs.o ramstage-y += cbfs.c
obj-y += lzma.o ramstage-y += lzma.c
#obj-y += lzmadecode.o #ramstage-y += lzmadecode.c
obj-y += gcc.o ramstage-y += gcc.c
obj-y += cbmem.o ramstage-y += cbmem.c
initobj-y += uart8250.o romstage-y += uart8250.c
initobj-y += memset.o romstage-y += memset.c
initobj-y += memcpy.o romstage-y += memcpy.c
initobj-y += memcmp.o romstage-y += memcmp.c
initobj-y += cbfs.o romstage-y += cbfs.c
initobj-y += lzma.o romstage-y += lzma.c
#initobj-y += lzmadecode.o #romstage-y += lzmadecode.c
initobj-$(CONFIG_CONSOLE_NE2K) += ne2k.o romstage-$(CONFIG_CONSOLE_NE2K) += ne2k.c
initobj-$(CONFIG_CONSOLE_NE2K) += compute_ip_checksum.o romstage-$(CONFIG_CONSOLE_NE2K) += compute_ip_checksum.c
driver-$(CONFIG_CONSOLE_NE2K) += ne2k.o driver-$(CONFIG_CONSOLE_NE2K) += ne2k.c
obj-$(CONFIG_USBDEBUG) += usbdebug.o ramstage-$(CONFIG_USBDEBUG) += usbdebug.c
obj-$(CONFIG_COMPRESSED_PAYLOAD_LZMA) += lzma.o ramstage-$(CONFIG_COMPRESSED_PAYLOAD_LZMA) += lzma.c
obj-$(CONFIG_BOOTSPLASH) += jpeg.o ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c
smmobj-y += memcpy.o smm-y += memcpy.c
$(obj)/lib/version.o : $(obj)/build.h $(obj)/lib/version.ramstage.o : $(obj)/build.h

View File

@ -17,4 +17,4 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += ../../../drivers/i2c/i2cmux/i2cmux.o ramstage-y += ../../../drivers/i2c/i2cmux/i2cmux.c

View File

@ -17,4 +17,4 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += ../../../drivers/i2c/i2cmux2/i2cmux2.o ramstage-y += ../../../drivers/i2c/i2cmux2/i2cmux2.c

View File

@ -1,4 +1,4 @@
# Needed by irq_tables and mptable and acpi_tables. # Needed by irq_tables and mptable and acpi_tables.
obj-y += ../../../drivers/i2c/i2cmux2/i2cmux2.o ramstage-y += ../../../drivers/i2c/i2cmux2/i2cmux2.c

View File

@ -1,3 +1,3 @@
ROMCCFLAGS := -mcpu=i386 -O ROMCCFLAGS := -mcpu=i386 -O
obj-y += northbridge.o ramstage-y += northbridge.c

View File

@ -17,7 +17,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
driver-y += rtl8168.o driver-y += rtl8168.c
obj-$(CONFIG_HAVE_ACPI_SLIC) += acpi_slic.o ramstage-$(CONFIG_HAVE_ACPI_SLIC) += acpi_slic.c
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -17,4 +17,4 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-$(CONFIG_SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL) += fanctl.o ramstage-$(CONFIG_SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL) += fanctl.c

View File

@ -1 +1 @@
obj-y += ../../../drivers/i2c/i2cmux/i2cmux.o ramstage-y += ../../../drivers/i2c/i2cmux/i2cmux.c

View File

@ -17,6 +17,6 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += rtl8168.o ramstage-y += rtl8168.c
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -17,6 +17,6 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
driver-y += rtl8168.o driver-y += rtl8168.c
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -17,6 +17,6 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
driver-y += rtl8168.o driver-y += rtl8168.c
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -18,6 +18,6 @@
## ##
# FIXME drivers should be selected through Kconfig # FIXME drivers should be selected through Kconfig
obj-y += ../../../drivers/i2c/i2cmux2/i2cmux2.o ramstage-y += ../../../drivers/i2c/i2cmux2/i2cmux2.c
obj-y += ../../../drivers/i2c/adm1027/adm1027.o ramstage-y += ../../../drivers/i2c/adm1027/adm1027.c

View File

@ -1,2 +1,2 @@
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -17,8 +17,8 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += m3885.o ramstage-y += m3885.c
obj-y += ec.o ramstage-y += ec.c
driver-y += rtl8168.o driver-y += rtl8168.c
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -17,6 +17,6 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## ##
obj-y += ../../../drivers/i2c/i2cmux2/i2cmux2.o ramstage-y += ../../../drivers/i2c/i2cmux2/i2cmux2.c
# Needed by irq_tables and mptable and acpi_tables. # Needed by irq_tables and mptable and acpi_tables.

View File

@ -19,4 +19,4 @@
## ##
ROMCCFLAGS=-mcpu=p4 -O2 ROMCCFLAGS=-mcpu=p4 -O2
obj-y += ../../../drivers/generic/debug/debug_dev.o ramstage-y += ../../../drivers/generic/debug/debug_dev.c

View File

@ -19,4 +19,4 @@
## ##
ROMCCFLAGS=-mcpu=p4 -O2 ROMCCFLAGS=-mcpu=p4 -O2
obj-y += ../../../drivers/generic/debug/debug_dev.o ramstage-y += ../../../drivers/generic/debug/debug_dev.c

View File

@ -20,7 +20,7 @@
# Needed by irq_tables and mptable and acpi_tables. # Needed by irq_tables and mptable and acpi_tables.
# This is debug message for products of Technexion. # This is debug message for products of Technexion.
obj-y += tn_post_code.o ramstage-y += tn_post_code.c
obj-y += speaker.o ramstage-y += speaker.c
obj-y += vgabios.o ramstage-y += vgabios.c

View File

@ -1,2 +1,2 @@
smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o smm-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.c

View File

@ -1 +1 @@
obj-y += ../../../drivers/i2c/adt7463/adt7463.o ramstage-y += ../../../drivers/i2c/adt7463/adt7463.c

View File

@ -1,2 +1,2 @@
obj-y += ../../../drivers/i2c/adm1027/adm1027.o ramstage-y += ../../../drivers/i2c/adm1027/adm1027.c

View File

@ -8,7 +8,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SUPERIO_WINBOND_W83697HF select SUPERIO_WINBOND_W83697HF
select BOARD_HAS_FADT select BOARD_HAS_FADT
select HAVE_OPTION_TABLE select HAVE_OPTION_TABLE
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_512 select BOARD_ROMSIZE_KB_512
config MAINBOARD_DIR config MAINBOARD_DIR

View File

@ -22,5 +22,5 @@
# This code is unused and should be replaced by the generic resume code # This code is unused and should be replaced by the generic resume code
# completely. If anyone works on wakeup for this chipset/board, delete # completely. If anyone works on wakeup for this chipset/board, delete
# wakeup.c when you are done. # wakeup.c when you are done.
# obj-y += wakeup.o # ramstage-y += wakeup.c

View File

@ -1,24 +0,0 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2009 One Laptop per Child, Association, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
unsigned char AmlCode_dsdt[] = {
0x44, 0x53, 0x44, 0x54, 0x0F, 0x3C, 0x00, 0x00,
/* Removed for lincense issue. See get_dsdt script. */
};

Some files were not shown because too many files have changed in this diff Show More