summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2014-07-22 15:59:16 -0700
committerMarc Jones <marc.jones@se-eng.com>2015-03-17 16:38:10 +0100
commitfbff908a7404a38d937d773e24824a52c4df389c (patch)
tree5681b806ff7293e89498be58a18ebe1015919c36 /src/soc
parent74aa7770f6ec4184faff83fce3d2e843e65cf347 (diff)
coreboot classes: Add dynamic classes to coreboot
Provide functionality to create dynamic classes based on program name and the architecture for which the program needs to be compiled/linked. define_class takes program_name and arch as its arguments and adds the program_name to classes-y to create dynamic class and compiler toolset is created for the specified arch. All the files for this program can then be added to program_name-y += .. Ensure that define_class is called before any files are added to the class. Check subdirs-y for order of directory inclusion. One such example of dynamic class is rmodules. Multiple rmodules can be used which need to be compiled for different architectures. With dynamic classes, this is possible. BUG=chrome-os-partner:30784 BRANCH=None TEST=Compiles successfully for nyan, rush and link. Original-Change-Id: I3e3aadbe723d432b9b3500c44bcff578c98f5643 Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/209379 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Original-Commit-Queue: Aaron Durbin <adurbin@chromium.org> (cherry picked from commit 242bb90d7476c2ee47d60c50ee18785edeb1a295) Some of this cherry-pick had already been committed here: commit 133096b6dc31163f59f658e15f2eb342a0de2ac6 Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I9f5868d704c4b3251ca6f54afa634588108a788c Reviewed-on: http://review.coreboot.org/8672 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/nvidia/tegra124/Makefile.inc4
-rw-r--r--src/soc/samsung/exynos5420/Makefile.inc3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/soc/nvidia/tegra124/Makefile.inc b/src/soc/nvidia/tegra124/Makefile.inc
index 6631364234..9ed7669aea 100644
--- a/src/soc/nvidia/tegra124/Makefile.inc
+++ b/src/soc/nvidia/tegra124/Makefile.inc
@@ -68,8 +68,8 @@ ramstage-y += ../tegra/usb.c
ramstage-y += timer.c
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
-rmodules-y += monotonic_timer.c
-VBOOT_STUB_DEPS += $(obj)/soc/nvidia/tegra124/monotonic_timer.rmodules.o
+rmodules_$(ARCH-romstage-y)-y += monotonic_timer.c
+VBOOT_STUB_DEPS += $(obj)/soc/nvidia/tegra124/monotonic_timer.rmodules_$(ARCH-romstage-y).o
CPPFLAGS_common += -Isrc/soc/nvidia/tegra124/include/
diff --git a/src/soc/samsung/exynos5420/Makefile.inc b/src/soc/samsung/exynos5420/Makefile.inc
index ac22620f38..eadf8ed348 100644
--- a/src/soc/samsung/exynos5420/Makefile.inc
+++ b/src/soc/samsung/exynos5420/Makefile.inc
@@ -48,6 +48,9 @@ ramstage-y += dp.c dp_lowlevel.c fimd.c
ramstage-y += usb.c
ramstage-y += cbmem.c
+rmodules_$(ARCH-romstage-y)-y += monotonic_timer.c
+rmodules_$(ARCH-romstage-y)-y += mct.c
+
$(objcbfs)/bootblock.raw.elf: $(objcbfs)/bootblock.elf
cp $< $@