summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc4
-rw-r--r--src/arch/x86/Makefile.inc4
2 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 1f74bbeae5..7f5563a25e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -188,11 +188,13 @@ endef
#######################################################################
# Add handler to compile ACPI's ASL
+# arg1: base file name
+# arg2: y or n for including in cbfs. defaults to y
define asl_template
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/$(1).aml-file = $(obj)/$(1).aml
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/$(1).aml-type = raw
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/$(1).aml-compression = none
-cbfs-files-y += $(call strip_quotes,$(CONFIG_CBFS_PREFIX))/$(1).aml
+cbfs-files-$(if $(2),$(2),y) += $(call strip_quotes,$(CONFIG_CBFS_PREFIX))/$(1).aml
$(obj)/$(1).aml: $(src)/mainboard/$(MAINBOARDDIR)/$(1).asl $(obj)/config.h
@printf " IASL $$(subst $(top)/,,$$(@))\n"
$(CC_ramstage) -x assembler-with-cpp -E -MMD -MT $$(@) $$(CPPFLAGS_ramstage) -D__ACPI__ -P -include $(src)/include/kconfig.h -I$(obj) -I$(src) -I$(src)/include -I$(src)/arch/$(ARCHDIR-$(ARCH-ramstage-y))/include -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$@
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index d5b320f6cd..d0b276d393 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -283,7 +283,11 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/reset.c
endif
ifeq ($(CONFIG_HAVE_ACPI_TABLES),y)
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/acpi_tables.c
+ifeq ($(CONFIG_COMPILE_IN_DSDT),y)
+$(eval $(call asl_template,dsdt,n))
+else
$(eval $(call asl_template,dsdt))
+endif
ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/fadt.c),)
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/fadt.c
endif