summaryrefslogtreecommitdiff
path: root/src/lib/Makefile.inc
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-07-17 23:42:33 +0200
committerNico Huber <nico.h@gmx.de>2017-10-28 19:45:06 +0000
commit625160fd6acb8a638c512a71b8c1aa7986c2d68e (patch)
tree430f8368102acfa8b398ad4bda7351c3a5ddd1f6 /src/lib/Makefile.inc
parent6fea323ffebbeb1df46dbd45ba049ff68c42bcfb (diff)
downloadcoreboot-625160fd6acb8a638c512a71b8c1aa7986c2d68e.tar.xz
lib: Prepare for libhwbase' generated config file
Add new libhwbase options and add a class for files generated during build. This follows the same pattern as for libgfxinit. Change-Id: Ie5b84992fa687e4e94b6d959a64086c638f66eb8 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20626 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/lib/Makefile.inc')
-rw-r--r--src/lib/Makefile.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index dfb23b625b..25537d20ed 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -288,8 +288,21 @@ $(obj)/%.elf.rmod: $(obj)/%.elf | $(RMODTOOL)
ifeq ($(CONFIG_RAMSTAGE_LIBHWBASE),y)
+to-ada-hex = $(eval $(1) := 16\\\#$(patsubst 0x%,%,$($(1)))\\\#)
+
+$(call to-ada-hex,CONFIG_HWBASE_DEFAULT_MMCONF)
+
$(call add-special-class,hw)
hw-handler = $(eval ramstage-srcs += $$(addprefix $(1),$(2)))
+
+$(call add-special-class,hw-gen)
+hw-gen-handler = \
+ $(eval additional-dirs += $(dir $(2))) \
+ $(eval ramstage-srcs += $(2)) \
+ $(eval ramstage-ads-deps += $(2)) \
+ $(eval ramstage-adb-deps += $(2)) \
+ $(eval $(2): $(obj)/config.h)
+
subdirs-y += ../../3rdparty/libhwbase
ramstage-$(CONFIG_HAVE_MONOTONIC_TIMER) += hw-time-timer.adb