X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Makefile.inc;h=b5e8811370c5c66df39b0d9f8c168234b3a09ad7;hb=563b38efe2089e1699ff7f7166b365f69bd3434c;hp=470077e4fd3777abaa4a2b04181ac27437fe5cbe;hpb=499fc926f8c877ab049f936fb9da7234e123edfb;p=coreboot.git diff --git a/Makefile.inc b/Makefile.inc index 470077e4f..b5e881137 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -43,7 +43,6 @@ subdirs-y += src/northbridge src/superio src/drivers src/cpu src/vendorcode subdirs-y += util/cbfstool util/sconfig util/nvramtool subdirs-y += src/arch/$(ARCHDIR-y) subdirs-y += src/mainboard/$(MAINBOARDDIR) -subdirs-y += src/vendorcode subdirs-$(CONFIG_ARCH_X86) += src/pc80 @@ -62,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) @@ -78,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:=) \