From fff888a1997ff7de9b29e24050fc4a0fd403ba16 Mon Sep 17 00:00:00 2001 From: Marian Balakowicz Date: Thu, 21 Feb 2008 17:20:19 +0100 Subject: [new uImage] Add gen_get_image() routine This routine assures that image (whether legacy or FIT) is not in a special dataflash storage. If image address is a dataflash address image is moved to system RAM. Signed-off-by: Marian Balakowicz --- common/cmd_bootm.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 2ddb191033..ebb6b69f4d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -44,10 +44,6 @@ #include #endif -#ifdef CONFIG_HAS_DATAFLASH -#include -#endif - DECLARE_GLOBAL_DATA_PTR; extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp); @@ -304,12 +300,8 @@ static image_header_t *get_kernel (cmd_tbl_t *cmdtp, int flag, show_boot_progress (1); printf ("## Booting image at %08lx ...\n", img_addr); -#ifdef CONFIG_HAS_DATAFLASH - if (addr_dataflash (img_addr)){ - hdr = (image_header_t *)CFG_LOAD_ADDR; - read_dataflash (img_addr, image_get_header_size (), (char *)hdr); - } else -#endif + /* copy from dataflash if needed */ + img_addr = gen_get_image (img_addr); hdr = (image_header_t *)img_addr; if (!image_check_magic(hdr)) { @@ -324,16 +316,8 @@ static image_header_t *get_kernel (cmd_tbl_t *cmdtp, int flag, show_boot_progress (-2); return NULL; } - show_boot_progress (3); -#ifdef CONFIG_HAS_DATAFLASH - if (addr_dataflash (img_addr)) - read_dataflash (img_addr + image_get_header_size (), - image_get_data_size (hdr), - (char *)image_get_data (hdr)); -#endif - - /* uImage is in a system RAM, pointed to by hdr */ + show_boot_progress (3); print_image_hdr (hdr); if (verify) { -- cgit v1.2.1