diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-06-06 23:07:40 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-06-30 22:52:43 +0200 |
commit | 3bab76a26e03df4ff81342fcc16393ce37d9766b (patch) | |
tree | 7f9872454654ad432dd68b921ab4af798f5686cf /common/cmd_doc.c | |
parent | 9810263afec5ac5f38f92963bb3b6d799e4331d0 (diff) | |
download | u-boot-3bab76a26e03df4ff81342fcc16393ce37d9766b.tar.gz u-boot-3bab76a26e03df4ff81342fcc16393ce37d9766b.tar.bz2 u-boot-3bab76a26e03df4ff81342fcc16393ce37d9766b.zip |
Delay FIT format check on sector based devices
Global FIT image operations like format check cannot be performed on
a first sector data, defer them to the point when whole FIT image was
uploaded to a system RAM.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Partial ('cmd_nand' case) Acked-by: Grant Erickson <gerickson@nuovations.com>
NAND and DOC bits Acked-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'common/cmd_doc.c')
-rw-r--r-- | common/cmd_doc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/common/cmd_doc.c b/common/cmd_doc.c index 83aba3744e..d7b2f535f3 100644 --- a/common/cmd_doc.c +++ b/common/cmd_doc.c @@ -206,7 +206,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif show_boot_progress (34); @@ -275,12 +275,6 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-130); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (131); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -304,8 +298,15 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-130); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (131); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ |