X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=second%2Fyaboot.c;h=0fd26a106af36d2599019ebb9289aa1ba150bc5b;hb=37d30b56405bf9858e0c1c1baad93105737e7a1b;hp=afa79eeb4feb031ecd9459e533ba8fa0700441dd;hpb=d01b3f4172d368eed8e56ab974e6028ce0710591;p=yaboot.git diff --git a/second/yaboot.c b/second/yaboot.c index afa79ee..0fd26a1 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -177,11 +177,13 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) /* Initialize OF interface */ prom_init ((prom_entry) 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); @@ -601,7 +603,7 @@ void check_password(char *str) prom_printf ("\n"); #ifdef USE_MD5_PASSWORDS if (!strncmp (password, "$1$", 3)) { - if (!check_md5_password(passwdbuff, password)) + if (!check_md5_password((unsigned char*)passwdbuff, (unsigned char*)password)) return; } else if (!strcmp (password, passwdbuff)) @@ -707,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) @@ -771,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; @@ -1168,6 +1177,8 @@ yaboot_text_ui(void) DEBUG_F("Entering kernel...\n"); + prom_print_available(); + /* call the kernel with our stack. */ kernel_entry(initrd_base + loadinfo.load_loc, initrd_size, prom, 0, 0); continue;