From 21d29f7f9f4888a4858b58b368ae7cf8783a6ebf Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Wed, 28 May 2014 11:33:33 +0200 Subject: bootm: make use of legacy image format configurable make the use of legacy image format configurable through the config define CONFIG_IMAGE_FORMAT_LEGACY. When relying on signed FIT images with required signature check the legacy image format should be disabled. Therefore introduce this new define and enable legacy image format if CONFIG_FIT_SIGNATURE is not set. If CONFIG_FIT_SIGNATURE is set disable per default the legacy image format. Signed-off-by: Heiko Schocher Cc: Simon Glass Cc: Lars Steubesand Cc: Mike Pearce Cc: Wolfgang Denk Cc: Tom Rini Cc: Michal Simek Acked-by: Simon Glass --- common/cmd_source.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/cmd_source.c') diff --git a/common/cmd_source.c b/common/cmd_source.c index 54ffd16..f3e9e60 100644 --- a/common/cmd_source.c +++ b/common/cmd_source.c @@ -29,7 +29,9 @@ int source (ulong addr, const char *fit_uname) { ulong len; +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) const image_header_t *hdr; +#endif ulong *data; int verify; void *buf; @@ -44,6 +46,7 @@ source (ulong addr, const char *fit_uname) buf = map_sysmem(addr, 0); switch (genimg_get_format(buf)) { +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) case IMAGE_FORMAT_LEGACY: hdr = buf; @@ -84,6 +87,7 @@ source (ulong addr, const char *fit_uname) */ while (*data++); break; +#endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: if (fit_uname == NULL) { -- cgit v1.1