Skip to content
Snippets Groups Projects
Commit 15158971 authored by Marian Balakowicz's avatar Marian Balakowicz Committed by Wolfgang Denk
Browse files

[new uImage] Fix uImage header pointer use in i386 do_bootm_linux()


Use image header copy instead of a (possibly corrupted) pointer to
a initial image location.

Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
parent 261dcf46
No related merge requests found
...@@ -129,13 +129,13 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], ...@@ -129,13 +129,13 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
} }
/* if multi-part image, we need to advance base ptr */ /* if multi-part image, we need to advance base ptr */
if (image_check_type (hdr, IH_TYPE_MULTI) && (len_ptr[1])) { if (image_check_type (&header, IH_TYPE_MULTI) && (len_ptr[1])) {
int i; int i;
for (i=0, addr+=sizeof(int); len_ptr[i++]; addr+=sizeof(int)); for (i=0, addr+=sizeof(int); len_ptr[i++]; addr+=sizeof(int));
} }
base_ptr = load_zimage((void*)addr + image_get_header_size (), base_ptr = load_zimage ((void*)addr + image_get_header_size (),
image_get_data_size (hdr), image_get_data_size (&header),
initrd_start, initrd_end-initrd_start, 0); initrd_start, initrd_end-initrd_start, 0);
if (NULL == base_ptr) { if (NULL == base_ptr) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment