summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-06-22 10:16:43 -0600
committerTom Rini <[email protected]>2025-06-22 10:16:43 -0600
commit1be8d14c85bdb4623262259d3fc61c32aca97660 (patch)
treeb7ddca3fd8a36a2df538478a341c02c1678445e7 /tools
parent9d169ac9733b5c3f208921a1d82f4fa8ff708258 (diff)
parent1989eb65c50e2541373bc6657a85620ff0c6f573 (diff)
Merge patch series "rsa and fit_check_sign build fix for v2025.07-rc"
Shiji Yang <[email protected]> says: This patchset fixes some compilation errors that I caught in version v2025.07-rc4 and branch next. If they are acceptable, please apply them to the master branch. If anyone has a better way to fix these issues, it's fine to ignore this patchset. Link: https://lore.kernel.org/r/OSBPR01MB16702ED24460D23A7ED63440BC7DA@OSBPR01MB1670.jpnprd01.prod.outlook.com
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/image-host.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 97ce1dbb17e..02297e8c93a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -63,7 +63,8 @@ HOSTCFLAGS_img2srec.o := -pedantic
hostprogs-y += mkenvimage
mkenvimage-objs := mkenvimage.o os_support.o generated/lib/crc32.o
-hostprogs-y += dumpimage mkimage fit_info fit_check_sign
+hostprogs-y += dumpimage mkimage fit_info
+hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_check_sign
hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += fdt_add_pubkey
hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += preload_check_sign
diff --git a/tools/image-host.c b/tools/image-host.c
index a9b86902763..21dd7f2d922 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -19,7 +19,7 @@
#include <openssl/evp.h>
#endif
-#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)
+#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) && CONFIG_IS_ENABLED(LIBCRYPTO)
#include <openssl/rsa.h>
#include <openssl/err.h>
#endif
@@ -1416,7 +1416,7 @@ int fit_check_sign(const void *fit, const void *key,
}
#endif
-#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)
+#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) && CONFIG_IS_ENABLED(LIBCRYPTO)
/**
* rsa_verify_openssl() - Verify a signature against some data with openssl API
*