aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-06-22 21:10:34 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-06-23 21:19:02 +0200
commitc32a52c200f115cd910188cfd91438b11e58fcb1 (patch)
tree98290b0bc1db0652ca6226a253ce2f28748b8af8 /src/arch/x86/Makefile.inc
parentedae744467297aa31e0ff994864ec0a68434758f (diff)
acpi: bring back ability to link DSDT into ramstage
Bring back the ability to link in the DSDT. This is to help Chrome OS to switch over to a new upstream quickly (because some of the custom built mechanisms are a pain with tons of files). This is supposed to be temporary (famous last words), but I'd rather fix the lack of CBFS awareness in CrOS bit for good in the time I usually spend on keeping upstream and CrOS branches close. Change-Id: I7fa5540bbf5c568c4adca56a09c83b6c7e358ad5 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10637 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86/Makefile.inc')
-rw-r--r--src/arch/x86/Makefile.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 02c29c4483..eaab2de96c 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -245,6 +245,23 @@ endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32)$(CONFIG_ARCH_RAMSTAGE_X86_64),y)
+ifeq ($(CONFIG_COMPILE_IN_DSDT),y)
+ramstage-srcs += $(obj)/dsdt.aml
+
+ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y)
+target-objcopy=-O elf32-i386 -B i386
+endif
+ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_64),y)
+target-objcopy=-O elf64-x86_64 -B x86_64
+endif
+
+define ramstage-objs_aml_template
+$(call src-to-obj,ramstage,$(1).aml): $(1).aml
+ @printf " OBJCOPY $$(subst $$(obj)/,,$$(@))\n"
+ cd $$(dir $$@) && $$(OBJCOPY_ramstage) -I binary $$(target-objcopy) $$(notdir $$<) $$(notdir $$@)
+endef
+endif
+
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
ifeq ($(CONFIG_GENERATE_MP_TABLE),y)
ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/mptable.c),)