Various Winbond/Nuvoton W83527HG fixes as per datasheet.
[coreboot.git] / Makefile
index 0cfa85f6e8e473de9c7321fef190d6881e84f2df..a61acdf9db387af202f39b2ed473c4f41ad259e3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,10 @@ export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
 CONFIG_SHELL := sh
 KBUILD_DEFCONFIG := configs/defconfig
 UNAME_RELEASE := $(shell uname -r)
-HAVE_DOTCONFIG := $(wildcard .config)
+DOTCONFIG ?= .config
+KCONFIG_CONFIG = $(DOTCONFIG)
+export KCONFIG_CONFIG
+HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG))
 MAKEFLAGS += -rR --no-print-directory
 
 # Make is silent per default, but 'make V=1' will show all compiler calls.
@@ -111,7 +114,7 @@ endif
 
 strip_quotes = $(subst ",,$(subst \",,$(1)))
 
-ARCHDIR-$(CONFIG_ARCH_X86)    := i386
+ARCHDIR-$(CONFIG_ARCH_X86)    := x86
 ARCHDIR-$(CONFIG_ARCH_POWERPC) := ppc
 
 MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR))
@@ -181,6 +184,7 @@ ramstage-srcs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
 romstage-srcs:=
 driver-srcs:=
 smm-srcs:=
+cbfs-files:=
 
 ramstage-objs:=
 romstage-objs:=
@@ -194,11 +198,20 @@ types:=ramstage romstage driver smm
 includemakefiles= \
        $(foreach type,$(2), $(eval $(type)-y:=)) \
        $(eval subdirs-y:=) \
+       $(eval cbfs-files-y:=) \
        $(eval -include $(1)) \
        $(foreach type,$(2), \
                $(eval $(type)-srcs+= \
                        $$(subst $(top)/,, \
                        $$(abspath $$(addprefix $(dir $(1)),$$($(type)-y)))))) \
+       $(foreach file,$(cbfs-files-y), \
+               $(if $(wildcard $(dir $(1))$(file)), \
+                       $(eval tmp-cbfs-file:= $(wildcard $(dir $(1))$(file))), \
+                       $(eval tmp-cbfs-file:= $(file))) \
+               $(eval cbfs-files += $(tmp-cbfs-file)|$$($(file)-name)|$$($(file)-type)|$$($(file)-position)) \
+               $(eval $(file)-name:=) \
+               $(eval $(file)-type:=) \
+               $(eval $(file)-position:=)) \
        $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
 
 # For each path in $(subdirs) call includemakefiles
@@ -272,6 +285,7 @@ printall:
        @echo allsrcs=$(allsrcs)
        @echo DEPENDENCIES=$(DEPENDENCIES)
        @echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME)
+       @echo cbfs-files:='$(cbfs-files)'
 
 printcrt0s:
        @echo crt0s=$(crt0s)