X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fm68k%2Flib%2Fbootm.c;h=cc45167fcd584077d093fb4939dec4e8fae08669;hb=36f05e60f9cedbb4cb5c57211a6ddb85b1a82cb7;hp=d506d0cc7700da559f074cb79f219f02a3d4ec8e;hpb=770605e4f9874230728f5a592820c619b1565ebc;p=u-boot diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index d506d0cc77..cc45167fcd 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -75,16 +75,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima void (*kernel) (bd_t *, ulong, ulong, ulong, ulong); struct lmb *lmb = &images->lmb; + /* + * allow the PREP bootm subcommand, it is required for bootm to work + */ + if (flag & BOOTM_STATE_OS_PREP) + return 0; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; - /* allocate space and init command line */ - ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end); - if (ret) { - puts("ERROR with allocation of cmdline\n"); - goto error; - } - /* allocate space for kernel copy of board info */ ret = boot_get_kbd (lmb, &kbd); if (ret) { @@ -93,14 +92,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima } set_clocks_in_mhz(kbd); - kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep; - - rd_len = images->rd_end - images->rd_start; - ret = boot_ramdisk_high (lmb, images->rd_start, rd_len, - &initrd_start, &initrd_end); + ret = image_setup_linux(images); if (ret) goto error; + kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep; + debug("## Transferring control to Linux (at address %08lx) ...\n", (ulong) kernel);