diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-05-17 12:12:39 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-05-18 11:43:49 +0000 |
commit | f206cda84daef3bcc696c4593f8815a92a7319d1 (patch) | |
tree | afcebd7f32a7bd499a8222120678e1a93740cf2c /src/arch | |
parent | b79d0a17992886d1e8558a9ebe536f12fcf336b1 (diff) |
option: Introduce `CMOS_LAYOUT_FILE` Kconfig symbol
Mainboards with variants may not always use the same cmos.layout file.
Turn the hardcoded path into a Kconfig symbol to allow changing it.
Tested with BUILD_TIMELESS=1: Without including the config file in the
coreboot.rom and with `USE_OPTION_TABLE` selected, building for the Asus
P8H61-M PRO produces an identical coreboot image.
Change-Id: I4cc622dcb70855c06cb8a816c34406f8421180df
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54366
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/Makefile.inc | 10 |
1 files changed, 6 insertions, 4 deletions
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)) |