summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-03-27 14:14:58 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-03-28 19:15:54 +0100
commit70a6b4f9314e9f5cd55550e631ccbc28318299c4 (patch)
tree8ac8d4aa92a5a18b257bfe6808b061a80789772a /src/arch
parentea9f30801822716349772157e12d943b11975521 (diff)
downloadcoreboot-70a6b4f9314e9f5cd55550e631ccbc28318299c4.tar.xz
arch/x86: Guard option table specific rules with HAVE_OPTION_TABLE
This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Ia22c9fcbf8c629d0eb3f1356f80c4565f117d8b8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9110 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/Makefile.inc27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 175a767e51..e6b4bad64c 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -29,14 +29,27 @@ subdirs-y += smp
DISASSEMBLY=-Wa,--divide
+################################################################################
+# i386 specific tools
+NVRAMTOOL:=$(objutil)/nvramtool/nvramtool
+
OPTION_TABLE_H:=
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
+
cbfs-files-y += cmos_layout.bin
cmos_layout.bin-file = $(obj)/cmos_layout.bin
cmos_layout.bin-type = 0x01aa
+$(obj)/cmos_layout.bin: $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
+ @printf " OPTION $(subst $(obj)/,,$(@))\n"
+ $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -L $@
+
OPTION_TABLE_H:=$(obj)/option_table.h
-endif
+
+$(OPTION_TABLE_H): $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
+ @printf " OPTION $(subst $(obj)/,,$(@))\n"
+ $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -H $@
+endif # CONFIG_HAVE_OPTION_TABLE
stripped_vgabios_id = $(call strip_quotes,$(CONFIG_VGA_BIOS_ID))
cbfs-files-$(CONFIG_VGA_BIOS) += pci$(stripped_vgabios_id).rom
@@ -53,18 +66,6 @@ CBFSTOOL_PRE1_OPTS = -m x86 -o $$(( $(CONFIG_ROM_SIZE) - $(CONFIG_CBFS_SIZE) ))
CBFSTOOL_PRE_OPTS = -b $(shell cat $(objcbfs)/base_xip.txt) -S ".car.data"
endif
-################################################################################
-# i386 specific tools
-NVRAMTOOL:=$(objutil)/nvramtool/nvramtool
-
-$(OPTION_TABLE_H): $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
- @printf " OPTION $(subst $(obj)/,,$(@))\n"
- $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -H $@
-
-$(obj)/cmos_layout.bin: $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
- @printf " OPTION $(subst $(obj)/,,$(@))\n"
- $(NVRAMTOOL) -y $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout -L $@
-
###############################################################################
# bootblock