mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/3] crypto: fix compile with empty CONFIG_CRYPTO_PUBLIC_KEYS
Date: Mon, 14 Oct 2024 13:52:12 +0200	[thread overview]
Message-ID: <20241014115213.2846066-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241014115213.2846066-1-a.fatoum@pengutronix.de>

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@barebox.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@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




  reply	other threads:[~2024-10-14 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 11:52 [PATCH 1/3] keytoc: check for memory allocation failures Ahmad Fatoum
2024-10-14 11:52 ` Ahmad Fatoum [this message]
2024-10-14 11:52 ` [PATCH 3/3] FIT: add dependency on CRYPTO_BUILTIN_KEYS for signature verification Ahmad Fatoum
2024-10-15  7:33 ` [PATCH 1/3] keytoc: check for memory allocation failures Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241014115213.2846066-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox