[PATCH 2/3] image-cipher: Fix FIT_CIPHER linking

Joel Stanley joel at jms.id.au
Wed Nov 11 12:18:32 CET 2020


When CONFIG_FIT_CIPHER=y and CONFIG_FIT_SIGNATURE=n is there is no
implementation of image_get_host_blob for mkimage or dumpimage:

 /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data':
 image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob'

The implementation is the same as common/image-fit-sig.c.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 common/image-cipher.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/common/image-cipher.c b/common/image-cipher.c
index 4ca9eec4ef15..fcbbceb847a5 100644
--- a/common/image-cipher.c
+++ b/common/image-cipher.c
@@ -15,6 +15,20 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <uboot_aes.h>
 #include <u-boot/aes.h>
 
+#ifdef USE_HOSTCC
+void *host_blob;
+
+void image_set_host_blob(void *blob)
+{
+	host_blob = blob;
+}
+
+void *image_get_host_blob(void)
+{
+	return host_blob;
+}
+#endif
+
 struct cipher_algo cipher_algos[] = {
 	{
 		.name = "aes128",
-- 
2.28.0



More information about the U-Boot mailing list