summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-02-21 17:20:19 +0100
committerMarian Balakowicz <m8@semihalf.com>2008-02-21 17:20:19 +0100
commitfff888a1997ff7de9b29e24050fc4a0fd403ba16 (patch)
treeb78ae8fa3cda983eac6f4501fbde79b5fab27ccf /common/cmd_bootm.c
parent75d3e8fbd93c14d9929d024c75af2d742c76db70 (diff)
downloadu-boot-imx-fff888a1997ff7de9b29e24050fc4a0fd403ba16.zip
u-boot-imx-fff888a1997ff7de9b29e24050fc4a0fd403ba16.tar.gz
u-boot-imx-fff888a1997ff7de9b29e24050fc4a0fd403ba16.tar.bz2
[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 <m8@semihalf.com>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 2ddb191..ebb6b69 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -44,10 +44,6 @@
#include <hush.h>
#endif
-#ifdef CONFIG_HAS_DATAFLASH
-#include <dataflash.h>
-#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) {