mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
[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: Marian Balakowicz <m8@semihalf.com>
This commit is contained in:
parent
261dcf4624
commit
15158971f4
1 changed files with 3 additions and 3 deletions
|
@ -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 (image_check_type (hdr, IH_TYPE_MULTI) && (len_ptr[1])) {
|
||||
if (image_check_type (&header, IH_TYPE_MULTI) && (len_ptr[1])) {
|
||||
int i;
|
||||
for (i=0, addr+=sizeof(int); len_ptr[i++]; addr+=sizeof(int));
|
||||
}
|
||||
|
||||
base_ptr = load_zimage((void*)addr + image_get_header_size (),
|
||||
image_get_data_size (hdr),
|
||||
base_ptr = load_zimage ((void*)addr + image_get_header_size (),
|
||||
image_get_data_size (&header),
|
||||
initrd_start, initrd_end-initrd_start, 0);
|
||||
|
||||
if (NULL == base_ptr) {
|
||||
|
|
Loading…
Reference in a new issue