mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
5f65826b1b
commit
21d29f7f9f
14 changed files with 97 additions and 11 deletions
|
@ -17,7 +17,9 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
|
|||
ulong addr = CONFIG_SYS_LOAD_ADDR;
|
||||
ulong cnt;
|
||||
disk_partition_t info;
|
||||
#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
|
||||
image_header_t *hdr;
|
||||
#endif
|
||||
block_dev_desc_t *dev_desc;
|
||||
|
||||
#if defined(CONFIG_FIT)
|
||||
|
@ -62,6 +64,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
|
|||
bootstage_mark(BOOTSTAGE_ID_IDE_PART_READ);
|
||||
|
||||
switch (genimg_get_format((void *) addr)) {
|
||||
#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
|
||||
case IMAGE_FORMAT_LEGACY:
|
||||
hdr = (image_header_t *) addr;
|
||||
|
||||
|
@ -78,6 +81,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
|
|||
|
||||
cnt = image_get_image_size(hdr);
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONFIG_FIT)
|
||||
case IMAGE_FORMAT_FIT:
|
||||
fit_hdr = (const void *) addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue