bootm: refactor ramdisk locating code
Move determing if we have a ramdisk and where its located into the
common code. Keep track of the ramdisk start and end in the
bootm_headers_t image struct.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c
index 452eef7..8c0b225 100644
--- a/lib_i386/bootm.c
+++ b/lib_i386/bootm.c
@@ -36,7 +36,6 @@
{
void *base_ptr;
ulong os_data, os_len;
- ulong initrd_start, initrd_end;
image_header_t *hdr;
int ret;
#if defined(CONFIG_FIT)
@@ -44,11 +43,6 @@
size_t len;
#endif
- ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_I386,
- &initrd_start, &initrd_end);
- if (ret)
- goto error;
-
if (images->legacy_hdr_valid) {
hdr = images->legacy_hdr_os;
if (image_check_type (hdr, IH_TYPE_MULTI)) {
@@ -76,7 +70,7 @@
}
base_ptr = load_zimage ((void*)os_data, os_len,
- initrd_start, initrd_end - initrd_start, 0);
+ images->rd_start, images->rd_end - images->rd_start, 0);
if (NULL == base_ptr) {
printf ("## Kernel loading failed ...\n");