X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Makefile.inc;h=b5e8811370c5c66df39b0d9f8c168234b3a09ad7;hb=8c5b58e7c372d0c1666931040e35fef92ad56c4b;hp=b4855d0b6831802b68708973045d2612079db0f0;hpb=1dd0dda442c0bdf3e423b8bed69603901645149c;p=coreboot.git diff --git a/Makefile.inc b/Makefile.inc index b4855d0b6..b5e881137 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -40,7 +40,7 @@ PHONY+= clean-abuild coreboot lint lint-stable # root source directories of coreboot subdirs-y := src/lib src/boot src/console src/devices src/ec src/southbridge subdirs-y += src/northbridge src/superio src/drivers src/cpu src/vendorcode -subdirs-y += util/cbfstool util/sconfig +subdirs-y += util/cbfstool util/sconfig util/nvramtool subdirs-y += src/arch/$(ARCHDIR-y) subdirs-y += src/mainboard/$(MAINBOARDDIR) @@ -61,6 +61,11 @@ endif smm-c-ccopts:=-D__SMM__ smm-S-ccopts:=-D__SMM__ +# SMM TSEG base is dynamic +ifeq ($(CONFIG_SMM_TSEG),y) +smm-c-ccopts += -fpic +endif + ramstage-c-deps:=$$(OPTION_TABLE_H) romstage-c-deps:=$$(OPTION_TABLE_H) @@ -77,13 +82,27 @@ $(obj)/$(1).ramstage.o: src/$(1).asl $(obj)/config.h mv $$(basename $$@).c $$(basename $$@).hex endef +####################################################################### +# Parse plaintext cmos defaults into binary format +# arg1: source file +# arg2: binary file name +cbfs-files-processor-nvramtool= \ + $(eval $(2): $(1) $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout | $(objutil)/nvramtool/nvramtool ; \ + printf " CREATE $(2) (from $(1))\n"; $(objutil)/nvramtool/nvramtool -y $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout -D $(2).tmp -p $(1) && mv $(2).tmp $(2)) + ####################################################################### # Add handler for arbitrary files in CBFS $(call add-special-class,cbfs-files) cbfs-files-handler= \ + $(eval tmp-cbfs-method:=$(word 2, $(subst :, ,$($(2)-file)))) \ + $(eval $(2)-file:=$(word 1, $(subst :, ,$($(2)-file)))) \ $(if $(wildcard $(1)$($(2)-file)), \ $(eval tmp-cbfs-file:= $(wildcard $(1)$($(2)-file))), \ $(eval tmp-cbfs-file:= $($(2)-file))) \ + $(if $(tmp-cbfs-method), \ + $(eval tmp-old-cbfs-file:=$(tmp-cbfs-file)) \ + $(eval tmp-cbfs-file:=$(shell mktemp $(obj)/mainboard/$(MAINBOARDDIR)/cbfs-file.XXXXXX).out) \ + $(call cbfs-files-processor-$(tmp-cbfs-method),$(tmp-old-cbfs-file),$(tmp-cbfs-file))) \ $(eval cbfs-files += $(tmp-cbfs-file)|$(2)|$($(2)-type)|$($(2)-position)) \ $(eval $(2)-name:=) \ $(eval $(2)-type:=) \