[PATCH u-boot v2019.04-aspeed-openbmc 01/11] aspeed: Build secboot only when enabled

Joel Stanley joel at jms.id.au
Tue Apr 13 18:07:45 AEST 2021


The configuration option controls if the secboot code is used. When
there are no callers it is removed from the final u-boot binary. Instead
of relying on the linker to do this, only add it to the build system if
enabled.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 arch/arm/mach-aspeed/ast2600/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-aspeed/ast2600/Makefile b/arch/arm/mach-aspeed/ast2600/Makefile
index 0abac4c233e4..aafc4b2fe37f 100644
--- a/arch/arm/mach-aspeed/ast2600/Makefile
+++ b/arch/arm/mach-aspeed/ast2600/Makefile
@@ -1,2 +1,3 @@
-obj-y   += platform.o board_common.o scu_info.o utils.o cache.o crypto.o aspeed_verify.o
+obj-y   += platform.o board_common.o scu_info.o utils.o cache.o
+obj-$(CONFIG_ASPEED_SECURE_BOOT) += crypto.o aspeed_verify.o
 obj-$(CONFIG_SPL_BUILD) += spl.o spl_boot.o
-- 
2.30.2



More information about the openbmc mailing list