X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=1f3f1518845aa67b0a81847f226a775a2ea9c34d;hp=c73348845721ee06eaadaff8bab1e5cb8497e37f;hb=94adb3aee138118174e34f519ff6ce3e8ece707c;hpb=89aafcfba49a5a302c591b05c7c73d26451dcfda;ds=sidebyside diff --git a/second/yaboot.c b/second/yaboot.c index c733488..1f3f151 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -180,10 +180,10 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) prom_print_available(); /* Allocate some memory for malloc'ator */ - malloc_base = prom_claim_chunk((void *)MALLOCADDR, MALLOCSIZE, 0); + malloc_base = prom_claim_chunk_top(MALLOCSIZE, 0); if (malloc_base == (void *)-1) { - prom_printf("Can't claim malloc buffer (%d bytes at 0x%08x)\n", - MALLOCSIZE, MALLOCADDR); + prom_printf("Can't claim malloc buffer of %d bytes\n", + MALLOCSIZE); return -1; } malloc_init(malloc_base, MALLOCSIZE); @@ -709,9 +709,10 @@ int get_params(struct boot_param_t* params) if (!imagename) { if (bootoncelabel[0] != 0) imagename = bootoncelabel; - else if (bootlastlabel[0] != 0) - imagename = bootlastlabel; - else + else if (bootlastlabel[0] != 0) { + imagename = bootlastlabel; + word_split(&imagename, ¶ms->args); + } else imagename = cfg_get_default(); } if (imagename) @@ -773,7 +774,13 @@ int get_params(struct boot_param_t* params) imagename = cfg_get_default(); /* write the imagename out so it can be reused on reboot if necessary */ - prom_set_options("boot-last-label", imagename, strlen(imagename)); + strcpy(bootlastlabel, imagename); + if (params->args && params->args[0]) { + strcat(bootlastlabel, " "); + strcat(bootlastlabel, params->args); + } + prom_set_options("boot-last-label", bootlastlabel, + strlen(bootlastlabel) + 1); label = 0; defdevice = boot.dev;