diff mbox series

[3/5] common: image_sign_info helper functions in SPL

Message ID 20200415164623.142908-4-xypron.glpk@gmx.de
State Accepted
Commit 6441164dda7dac0c4039c90c329e973786c21b22
Headers show
Series lib: reduce SPL size | expand

Commit Message

Heinrich Schuchardt April 15, 2020, 4:46 p.m. UTC
Do not build image_sign_info helper functions in SPL if not needed.

Fixes: b983cc2da0ba ("lib: rsa: decouple rsa from FIT image verification")
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 Kconfig         |  2 +-
 common/Kconfig  | 11 +++++++++++
 common/Makefile |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

--
2.25.1

Comments

Tom Rini April 16, 2020, 2:32 a.m. UTC | #1
On Wed, Apr 15, 2020 at 06:46:21PM +0200, Heinrich Schuchardt wrote:

> Do not build image_sign_info helper functions in SPL if not needed.
> 
> Fixes: b983cc2da0ba ("lib: rsa: decouple rsa from FIT image verification")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

Reviewed-by: Tom Rini <trini at konsulko.com>
Tom Rini April 24, 2020, 5:11 p.m. UTC | #2
On Wed, Apr 15, 2020 at 06:46:21PM +0200, Heinrich Schuchardt wrote:

> Do not build image_sign_info helper functions in SPL if not needed.
> 
> Fixes: b983cc2da0ba ("lib: rsa: decouple rsa from FIT image verification")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Reviewed-by: Tom Rini <trini at konsulko.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 1b0b6999d8..6038e93afb 100644
--- a/Kconfig
+++ b/Kconfig
@@ -447,7 +447,7 @@  config SPL_FIT_SIGNATURE
 	select SPL_FIT
 	select SPL_RSA
 	select SPL_RSA_VERIFY
-	select IMAGE_SIGN_INFO
+	select SPL_IMAGE_SIGN_INFO

 config SPL_LOAD_FIT
 	bool "Enable SPL loading U-Boot as a FIT (basic fitImage features)"
diff --git a/common/Kconfig b/common/Kconfig
index 3072651082..75d9dfdc33 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1053,3 +1053,14 @@  config IMAGE_SIGN_INFO
 	select SHA256
 	help
 	  Enable image_sign_info helper functions.
+
+if IMAGE_SIGN_INFO
+
+config SPL_IMAGE_SIGN_INFO
+	bool
+	select SHA1
+	select SHA256
+	help
+	  Enable image_sign_info helper functions in SPL.
+
+endif
diff --git a/common/Makefile b/common/Makefile
index 702f2396cf..ad030e05eb 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -112,7 +112,7 @@  obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
 obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
 obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o
-obj-$(CONFIG_IMAGE_SIGN_INFO) += image-sig.o
+obj-$(CONFIG_$(SPL_TPL_)IMAGE_SIGN_INFO) += image-sig.o
 obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-fit-sig.o
 obj-$(CONFIG_$(SPL_TPL_)FIT_CIPHER) += image-cipher.o
 obj-$(CONFIG_IO_TRACE) += iotrace.o