aboutsummaryrefslogtreecommitdiff
path: root/lib_i386
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-03-12 10:33:00 +0100
committerMarian Balakowicz <m8@semihalf.com>2008-03-12 10:33:00 +0100
commitcd7c596e9f561dbbc17b717277438aee78cde14f (patch)
tree1766af01b819e4f7c341cb841742cb6242ff0b33 /lib_i386
parent3dfe110149311425919e6d6a14b561b4207498f1 (diff)
[new uImage] Add new uImage format support to arch specific do_bootm_linux() routines
This patch updates architecture specific implementations of do_bootm_linux() adding new uImage format handling for operations like get kernel entry point address, get kernel image data start address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'lib_i386')
-rw-r--r--lib_i386/bootm.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c
index b4a52fa21..107ebaaa6 100644
--- a/lib_i386/bootm.c
+++ b/lib_i386/bootm.c
@@ -40,11 +40,15 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ulong ep;
image_header_t *hdr;
int ret;
+#if defined(CONFIG_FIT)
+ const void *data;
+ size_t len;
+#endif
ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_I386,
&initrd_start, &initrd_end);
if (ret)
- do_reset (cmdtp, flag, argc, argv);
+ goto error;
if (images->legacy_hdr_valid) {
hdr = images->legacy_hdr_os;
@@ -58,12 +62,18 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
}
#if defined(CONFIG_FIT)
} else if (images->fit_uname_os) {
- fit_unsupported_reset ("I386 linux bootm");
- do_reset (cmdtp, flag, argc, argv);
+ ret = fit_image_get_data (images->fit_hdr_os,
+ images->fit_noffset_os, &data, &len);
+ if (ret) {
+ puts ("Can't get image data/size!\n");
+ goto error;
+ }
+ os_data = (ulong)data;
+ os_len = (ulong)len;
#endif
} else {
puts ("Could not find kernel image!\n");
- do_reset (cmdtp, flag, argc, argv);
+ goto error;
}
base_ptr = load_zimage ((void*)os_data, os_len,
@@ -71,7 +81,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
if (NULL == base_ptr) {
printf ("## Kernel loading failed ...\n");
- do_reset(cmdtp, flag, argc, argv);
+ goto error;
}
@@ -87,5 +97,11 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
printf("\nStarting kernel ...\n\n");
boot_zimage(base_ptr);
+ /* does not return */
+ return;
+error:
+ if (images->autostart)
+ do_reset (cmdtp, flag, argc, argv);
+ return;
}