summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-06-26 17:40:06 -0400
committerTom Rini <trini@konsulko.com>2020-06-27 08:00:33 -0400
commit193505b5485bd4837d98d5e97faa1a41c5b51fc4 (patch)
tree16908165e841adefa0e68693bf07a7fdb67084ab
parent87d6693e8874d15631ff946bebe247c85f62ebd6 (diff)
downloadu-boot-WIP/26Jun2020-next.tar.gz
x86: Don't build some unused objects in TPLWIP/26Jun2020-next
In the future if we have separate symbols for DM_SPI_FLASH and SPL_DM_SPI_FLASH we will not always have function declarations available for some DM calls. This in turn leads to build warnings but not failures as the code isn't used and is discarded at link time. Restructure things to not build code we won't use for TPL anyways. Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> --- I ran in to this as part of testing http://patchwork.ozlabs.org/project/uboot/patch/20200604151153.3980-4-Zhiqiang.Hou@nxp.com/ which we do need to bring in. I think we might be building a lot of codde that's then discarded for TPL builds, but didn't think this is the right place to tackle that in.
-rw-r--r--arch/x86/cpu/apollolake/Makefile2
-rw-r--r--arch/x86/lib/Makefile4
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/cpu/apollolake/Makefile b/arch/x86/cpu/apollolake/Makefile
index 3aa2a55676..11621256ae 100644
--- a/arch/x86/cpu/apollolake/Makefile
+++ b/arch/x86/cpu/apollolake/Makefile
@@ -3,7 +3,6 @@
# Copyright 2019 Google LLC
obj-$(CONFIG_SPL_BUILD) += cpu_spl.o
-obj-$(CONFIG_SPL_BUILD) += spl.o
obj-$(CONFIG_SPL_BUILD) += systemagent.o
obj-y += cpu_common.o
@@ -12,6 +11,7 @@ obj-y += cpu.o
obj-y += punit.o
obj-y += fsp_bindings.o
ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
obj-y += fsp_m.o
endif
endif
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 5cd4587480..1079bf2022 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -22,7 +22,6 @@ obj-y += init_helpers.o
obj-y += interrupts.o
obj-y += lpc-uclass.o
obj-y += mpspec.o
-obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
obj-y += northbridge-uclass.o
obj-$(CONFIG_I8259_PIC) += i8259.o
obj-$(CONFIG_I8254_TIMER) += i8254.o
@@ -45,9 +44,12 @@ ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_CMD_ZBOOT) += zimage.o
endif
obj-$(CONFIG_USE_HOB) += hob.o
+ifndef CONFIG_TPL_BUILD
+obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
obj-$(CONFIG_HAVE_FSP) += fsp/
obj-$(CONFIG_FSP_VERSION1) += fsp1/
obj-$(CONFIG_FSP_VERSION2) += fsp2/
+endif
ifdef CONFIG_SPL_BUILD
ifdef CONFIG_TPL_BUILD