diff options
author | Heiko Schocher <hs@denx.de> | 2014-05-28 11:33:33 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-05 14:44:56 -0400 |
commit | 21d29f7f9f4888a4858b58b368ae7cf8783a6ebf (patch) | |
tree | b6a50204d2e1af557756d43adbb54a60ca8ff78f /common/cmd_fdc.c | |
parent | 5f65826b1bbe155d839db7c92dca4653f0dcf025 (diff) | |
download | u-boot-imx-21d29f7f9f4888a4858b58b368ae7cf8783a6ebf.zip u-boot-imx-21d29f7f9f4888a4858b58b368ae7cf8783a6ebf.tar.gz u-boot-imx-21d29f7f9f4888a4858b58b368ae7cf8783a6ebf.tar.bz2 |
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 <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Lars Steubesand <lars.steubesand@philips.com>
Cc: Mike Pearce <mike@kaew.be>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Michal Simek <monstr@monstr.eu>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_fdc.c')
-rw-r--r-- | common/cmd_fdc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 1cfb656..5766b56 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -635,7 +635,9 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) FD_GEO_STRUCT *pFG = (FD_GEO_STRUCT *)floppy_type; FDC_COMMAND_STRUCT *pCMD = &cmd; unsigned long addr,imsize; +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) image_header_t *hdr; /* used for fdc boot */ +#endif unsigned char boot_drive; int i,nrofblk; #if defined(CONFIG_FIT) @@ -689,12 +691,14 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } switch (genimg_get_format ((void *)addr)) { +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) case IMAGE_FORMAT_LEGACY: hdr = (image_header_t *)addr; image_print_contents (hdr); imsize = image_get_image_size (hdr); break; +#endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; |