diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Kconfig | 6 | ||||
-rw-r--r-- | tools/Makefile | 4 | ||||
-rw-r--r-- | tools/fit_image.c | 2 | ||||
-rw-r--r-- | tools/image-host.c | 4 | ||||
-rw-r--r-- | tools/mkimage.c | 5 |
5 files changed, 17 insertions, 4 deletions
diff --git a/tools/Kconfig b/tools/Kconfig index 6e23f44d55..f01ed783e6 100644 --- a/tools/Kconfig +++ b/tools/Kconfig @@ -25,6 +25,11 @@ config TOOLS_LIBCRYPTO This selection does not affect target features, such as runtime FIT signature verification. +config TOOLS_KWBIMAGE + bool "Enable kwbimage support in host tools" + default y + select TOOLS_LIBCRYPTO + config TOOLS_FIT def_bool y help @@ -46,6 +51,7 @@ config TOOLS_FIT_RSASSA_PSS Support the rsassa-pss signature scheme in the tools builds config TOOLS_FIT_SIGNATURE + depends on TOOLS_LIBCRYPTO def_bool y help Enable signature verification of FIT uImages in the tools builds diff --git a/tools/Makefile b/tools/Makefile index 1aa1e36137..6a4280e366 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -94,6 +94,8 @@ LIBCRYPTO_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := \ generated/lib/fdt-libcrypto.o \ sunxi_toc0.o +KWB_IMAGE_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := kwbimage.o + ROCKCHIP_OBS = generated/lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o # common objs for dumpimage and mkimage @@ -114,7 +116,7 @@ dumpimage-mkimage-objs := aisimage.o \ imximage.o \ imx8image.o \ imx8mimage.o \ - kwbimage.o \ + $(KWB_IMAGE_OBJS-y) \ generated/lib/md5.o \ lpc32xximage.o \ mxsimage.o \ diff --git a/tools/fit_image.c b/tools/fit_image.c index 71e031c855..beef1fa86e 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -61,7 +61,7 @@ static int fit_add_file_data(struct image_tool_params *params, size_t size_inc, ret = fit_set_timestamp(ptr, 0, time); } - if (!ret) + if (CONFIG_IS_ENABLED(FIT_SIGNATURE) && !ret) ret = fit_pre_load_data(params->keydir, dest_blob, ptr); if (!ret) { diff --git a/tools/image-host.c b/tools/image-host.c index ca4950312f..90bc9f905f 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -14,8 +14,10 @@ #include <image.h> #include <version.h> +#if CONFIG_IS_ENABLED(FIT_SIGNATURE) #include <openssl/pem.h> #include <openssl/evp.h> +#endif /** * fit_set_hash_value - set hash value in requested has node @@ -1131,6 +1133,7 @@ static int fit_config_add_verification_data(const char *keydir, return 0; } +#if CONFIG_IS_ENABLED(FIT_SIGNATURE) /* * 0) open file (open) * 1) read certificate (PEM_read_X509) @@ -1239,6 +1242,7 @@ int fit_pre_load_data(const char *keydir, void *keydest, void *fit) out: return ret; } +#endif int fit_cipher_data(const char *keydir, void *keydest, void *fit, const char *comment, int require_keys, diff --git a/tools/mkimage.c b/tools/mkimage.c index 6dfe3e1d42..ac62ebbde9 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -115,7 +115,7 @@ static void usage(const char *msg) " -B => align size in hex for FIT structure and header\n" " -b => append the device tree binary to the FIT\n" " -t => update the timestamp in the FIT\n"); -#ifdef CONFIG_FIT_SIGNATURE +#if CONFIG_IS_ENABLED(FIT_SIGNATURE) fprintf(stderr, "Signing / verified boot options: [-k keydir] [-K dtb] [ -c <comment>] [-p addr] [-r] [-N engine]\n" " -k => set directory containing private keys\n" @@ -130,8 +130,9 @@ static void usage(const char *msg) " -o => algorithm to use for signing\n"); #else fprintf(stderr, - "Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)\n"); + "Signing / verified boot not supported (CONFIG_TOOLS_FIT_SIGNATURE undefined)\n"); #endif + fprintf(stderr, " %s -V ==> print version information and exit\n", params.cmdname); fprintf(stderr, "Use '-T list' to see a list of available image types\n"); |