diff options
author | Joel Stanley <joel@jms.id.au> | 2020-12-08 07:12:14 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-23 00:17:52 +0300 |
commit | 93af80f3e8fb6fcbfb851a6dc384999a61ddaedb (patch) | |
tree | f1e481358764352b0d2a81b3489f0ccbf2f3c829 /common/image-fit.c | |
parent | 5d40d5f12edac9ffccce955509f4cb4a7aa763a2 (diff) | |
download | u-boot-93af80f3e8fb6fcbfb851a6dc384999a61ddaedb.tar.xz |
image-fit: Fix FIT_CIPHER linking
When CONFIG_FIT_CIPHER=y and CONFIG_FIT_SIGNATURE=n is there is no
implementation of image_get_host_blob for mkimage/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'
Move the implementation to a common file so it can be shaed between
image-cipher.c and image-fit-sig.c.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'common/image-fit.c')
-rw-r--r-- | common/image-fit.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/image-fit.c b/common/image-fit.c index 21c44bdf69..8660c3fd81 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -112,6 +112,21 @@ int fit_parse_subimage(const char *spec, ulong addr_curr, } #endif /* !USE_HOSTCC */ +#ifdef USE_HOSTCC +/* Host tools use these implementations for Cipher and Signature support */ +static void *host_blob; + +void image_set_host_blob(void *blob) +{ + host_blob = blob; +} + +void *image_get_host_blob(void) +{ + return host_blob; +} +#endif /* USE_HOSTCC */ + static void fit_get_debug(const void *fit, int noffset, char *prop_name, int err) { |