diff options
-rw-r--r-- | Makefile.inc | 4 | ||||
-rw-r--r-- | src/Kconfig | 5 | ||||
-rw-r--r-- | src/arch/x86/Makefile.inc | 10 |
3 files changed, 13 insertions, 6 deletions
diff --git a/Makefile.inc b/Makefile.inc index da54e3b46e..eb505e553d 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -302,9 +302,9 @@ endef # arg1: source file # arg2: binary file name cbfs-files-processor-nvramtool= \ - $(eval $(2): $(1) $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout | $(objutil)/nvramtool/nvramtool ; \ + $(eval $(2): $(1) $(top)/$(call strip_quotes,$(CONFIG_CMOS_LAYOUT_FILE)) | $(objutil)/nvramtool/nvramtool ; \ printf " CREATE $(2) (from $(1))\n"; \ - $(objutil)/nvramtool/nvramtool -y $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout -D $(2).tmp -p $(1) && \ + $(objutil)/nvramtool/nvramtool -y $(top)/$(call strip_quotes,$(CONFIG_CMOS_LAYOUT_FILE)) -D $(2).tmp -p $(1) && \ mv $(2).tmp $(2)) ####################################################################### diff --git a/src/Kconfig b/src/Kconfig index fe325e8e5c..6d0ba0fedf 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -682,6 +682,11 @@ config HAVE_OPTION_TABLE file containing NVRAM/CMOS bit definitions. It defaults to 'n' but can be selected in mainboard/*/Kconfig. +config CMOS_LAYOUT_FILE + string + default "src/mainboard/\$(MAINBOARDDIR)/cmos.layout" + depends on HAVE_OPTION_TABLE + config PCI_IO_CFG_EXT bool default n diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index a7d91a4753..3949e3afa4 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -11,19 +11,21 @@ NVRAMTOOL:=$(objutil)/nvramtool/nvramtool OPTION_TABLE_H:= ifeq ($(CONFIG_HAVE_OPTION_TABLE),y) +CMOS_LAYOUT_FILE := $(top)/$(call strip_quotes,$(CONFIG_CMOS_LAYOUT_FILE)) + cbfs-files-y += cmos_layout.bin cmos_layout.bin-file = $(obj)/cmos_layout.bin cmos_layout.bin-type = cmos_layout -$(obj)/cmos_layout.bin: $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout +$(obj)/cmos_layout.bin: $(NVRAMTOOL) $(CMOS_LAYOUT_FILE) @printf " OPTION $(subst $(obj)/,,$(@))\n" - $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -L $@ + $(NVRAMTOOL) -y $(CMOS_LAYOUT_FILE) -L $@ OPTION_TABLE_H:=$(obj)/option_table.h -$(OPTION_TABLE_H): $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout +$(OPTION_TABLE_H): $(NVRAMTOOL) $(CMOS_LAYOUT_FILE) @printf " OPTION $(subst $(obj)/,,$(@))\n" - $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -H $@ + $(NVRAMTOOL) -y $(CMOS_LAYOUT_FILE) -H $@ endif # CONFIG_HAVE_OPTION_TABLE stripped_vgabios_id = $(call strip_quotes,$(CONFIG_VGA_BIOS_ID)) |