summaryrefslogtreecommitdiff
path: root/lib_ppc/bootm.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-04-11 11:07:49 +0200
committerWolfgang Denk <wd@denx.de>2008-04-17 23:59:05 -0700
commitcb1c4896905ab22fcd982e6a8a539f0031942e71 (patch)
tree31e02bd5eb93e4692cb23289a108beb951211e91 /lib_ppc/bootm.c
parentde2b3216e6b4f3b2fe93759c05b17504f9dfe036 (diff)
downloadu-boot-imx-cb1c4896905ab22fcd982e6a8a539f0031942e71.zip
u-boot-imx-cb1c4896905ab22fcd982e6a8a539f0031942e71.tar.gz
u-boot-imx-cb1c4896905ab22fcd982e6a8a539f0031942e71.tar.bz2
Restore the ability to continue booting after legacy image overwrite
Before new uImage code was merged, bootm code allowed for the kernel image to get overwritten during decompresion. new uImage introduced a check for image overwrites and refused to boot the image that got overwritten. This patch restores the old behavior. It also adds a warning when the image overwriten is a multi-image file, because in such case accessing componentes other than the first one will fail. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'lib_ppc/bootm.c')
-rw-r--r--lib_ppc/bootm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index b24a064..0328bad 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -146,7 +146,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
/* find kernel entry point */
if (images->legacy_hdr_valid) {
- ep = image_get_ep (images->legacy_hdr_os);
+ ep = image_get_ep (&images->legacy_hdr_os_copy);
#if defined(CONFIG_FIT)
} else if (images->fit_uname_os) {
ret = fit_image_get_entry (images->fit_hdr_os,
@@ -639,7 +639,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
printf (" Booting using the fdt blob at 0x%x\n", fdt_blob);
} else if (images->legacy_hdr_valid &&
- image_check_type (images->legacy_hdr_os, IH_TYPE_MULTI)) {
+ image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) {
ulong fdt_data, fdt_len;