[PATCH 2/3] crypto: fix compile with empty CONFIG_CRYPTO_PUBLIC_KEYS

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Oct 14 04:52:12 PDT 2024


This currently results in an error message from keytoc when there are no
keys to convert into C. This breaks make allyesconfig, so workaround
that by allowing the symbol to be empty and generating an empty header
in that case.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/crypto/Makefile b/crypto/Makefile
index aa8cd21e1d5d..0354e4568373 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -33,7 +33,13 @@ $(obj)/public-keys.o: $(obj)/public-keys.h
 CONFIG_CRYPTO_PUBLIC_KEYS := $(shell echo $(CONFIG_CRYPTO_PUBLIC_KEYS))
 CONFIG_CRYPTO_PUBLIC_KEYS := $(foreach d,$(CONFIG_CRYPTO_PUBLIC_KEYS),"$(d)")
 
+filechk_public_keys_dummy = echo
+
 $(obj)/public-keys.h: FORCE
+ifdef CONFIG_CRYPTO_PUBLIC_KEYS
 	$(call cmd,public_keys,$(CONFIG_CRYPTO_PUBLIC_KEYS))
+else
+	$(call filechk,public_keys_dummy)
+endif
 
 endif
-- 
2.39.5




More information about the barebox mailing list