summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2013-04-23 18:58:44 +0400
committerDongjin Kim <tobetter@gmail.com>2013-04-23 19:59:11 +0400
commita186bac8a065aceb23d6cfaf1a18d613d55cbf02 (patch)
tree0ffa4b88daa24fae87aca30b0da7bddc25259dcc
parent681af1e734c111c104d99d821a03a26e30ca6405 (diff)
downloadu-boot-a186bac8a065aceb23d6cfaf1a18d613d55cbf02.tar.xz
smdk4412: enable to boot uImage with uncompressed kernel
'bootm' command checks ZIMAGE_MAGIC (0x16f2818) at offset 24h of the beginning of the kernel image but failed with uImage since it has 64 bytes header. This failure makes 'hdr' to be zero and failed to boot with invalid reference. But this patch is also failed when uImage is loaded at the same address with Entry Address. Therefore uImage should be loaded another address somewhere to be copied itself to Load Address. Signed-off-by: Dongjin Kim <tobetter@gmail.com>
-rw-r--r--common/cmd_bootm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index fe1117231b..638e4c889c 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -724,8 +724,10 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_ZIMAGE_BOOT)
after_header_check:
- images.os.os = hdr->ih_os;
- images.ep = image_get_ep (&images.legacy_hdr_os_copy);
+ if (hdr != NULL) {
+ images.os.os = hdr->ih_os;
+ images.ep = image_get_ep (&images.legacy_hdr_os_copy);
+ }
#endif
#ifdef CONFIG_SILENT_CONSOLE