1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 08:12:06 +02:00

mkimage: Build signing only if board has CONFIG_FIT_SIGNATURE

At present mkimage is set up to always build with image signing support.
This means that the SSL libraries (e.g. libssl-dev) are always required.

Adjust things so that mkimage can be built with and without image signing,
controlled by the presence of CONFIG_FIT_SIGNATURE in the board config file.

If CONFIG_FIT_SIGNATURE is not enabled, then mkimage will report a warning
that signing is not supported. If the option is enabled, but libraries are
not available, then a build error similar to this will be shown:

lib/rsa/rsa-sign.c:26:25: fatal error: openssl/rsa.h: No such file or directory

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2013-06-27 10:43:18 -07:00
committed by Tom Rini
parent 5ff0d0832e
commit 29ce737d6f
3 changed files with 6 additions and 5 deletions

View File

@@ -96,7 +96,6 @@ HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
else
HOSTCC = gcc
HOSTLIBS += -lssl -lcrypto
endif
ifeq ($(HOSTOS),cygwin)
@@ -211,6 +210,11 @@ CPPFLAGS += -ffunction-sections -fdata-sections
LDFLAGS_FINAL += --gc-sections
endif
# TODO(sjg@chromium.org): Is this correct on Mac OS?
ifdef CONFIG_FIT_SIGNATURE
HOSTLIBS += -lssl -lcrypto
endif
ifneq ($(CONFIG_SYS_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
endif