int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t * images)
{
char *bootargs;
- ulong initrd_start, initrd_end;
ulong rd_len;
void (*kernel) (struct linux_romvec *, void *);
- struct lmb *lmb = &images->lmb;
int ret;
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
* extracted and is writeable.
*/
+ ret = image_setup_linux(images);
+ if (ret) {
+ puts("### Failed to relocate RAM disk\n");
+ goto error;
+ }
+
/* Calc length of RAM disk, if zero no ramdisk available */
rd_len = images->rd_end - images->rd_start;
if (rd_len) {
- ret = boot_ramdisk_high(lmb, images->rd_start, rd_len,
- &initrd_start, &initrd_end);
- if (ret) {
- puts("### Failed to relocate RAM disk\n");
- goto error;
- }
-
/* Update SPARC kernel header so that Linux knows
* what is going on and where to find RAM disk.
*
* Set INITRD Image address relative to RAM Start
*/
linux_hdr->hdr_input.ver_0203.sparc_ramdisk_image =
- initrd_start - CONFIG_SYS_RAM_BASE;
+ images->initrd_start - CONFIG_SYS_RAM_BASE;
linux_hdr->hdr_input.ver_0203.sparc_ramdisk_size = rd_len;
/* Clear READ ONLY flag if set to non-zero */
linux_hdr->hdr_input.ver_0203.root_flags = 1;