X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=66f288b82aea9eaff21c59ed1fd3bf52c26224b5;hp=3d93275018027376cafffb685104a0fbfea586d0;hb=19d463913aa7e20a567d5e7fb68b7fd69955b5fc;hpb=0c0a18b7a1a6b44963da4469d21428e76f9c2b30 diff --git a/second/yaboot.c b/second/yaboot.c index 3d93275..66f288b 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -300,6 +300,7 @@ void print_message_file(char *filename) } strncpy(msgpath, filename, sizeof(msgpath)); + msgfile = boot; /* Copy all the original paramters */ if (!parse_device_path(msgpath, defdev, defpart, "/etc/yaboot.msg", &msgfile)) { prom_printf("%s: Unable to parse\n", msgpath); goto done; @@ -470,6 +471,8 @@ static int load_my_config_file(struct boot_fspec_t *orig_fspec) int minlen; packet = prom_get_netinfo(); + if (!packet) + goto out; /* * First, try to match on mac address with the hardware type @@ -988,6 +991,7 @@ int get_params(struct boot_param_t* params) if (!label && password) check_password ("To boot a custom image you must enter the password."); + params->kernel = boot; /* Copy all the original paramters */ if (!parse_device_path(imagepath, defdevice, defpart, "/vmlinux", ¶ms->kernel)) { prom_printf("%s: Unable to parse\n", imagepath); @@ -1009,6 +1013,7 @@ int get_params(struct boot_param_t* params) strncpy(initrdpath, p, 1024); DEBUG_F("Parsing initrd path <%s>\n", initrdpath); + params->rd = boot; /* Copy all the original paramters */ if (!parse_device_path(initrdpath, defdevice, defpart, "/root.bin", ¶ms->rd)) { prom_printf("%s: Unable to parse\n", imagepath); @@ -1019,6 +1024,7 @@ int get_params(struct boot_param_t* params) if (p && *p) { DEBUG_F("Parsing sysmap path <%s>\n", p); strncpy(sysmappath, p, 1024); + params->sysmap = boot; /* Copy all the original paramters */ if (!parse_device_path(sysmappath, defdevice, defpart, "/boot/System.map", ¶ms->sysmap)) { prom_printf("%s: Unable to parse\n", imagepath); @@ -1606,7 +1612,7 @@ is_elf64(loadinfo_t *loadinfo) e->e_ident[EI_MAG3] == ELFMAG3 && e->e_ident[EI_CLASS] == ELFCLASS64 && e->e_ident[EI_DATA] == ELFDATA2MSB && - e->e_type == ET_EXEC && + (e->e_type == ET_EXEC || e->e_type == ET_DYN) && e->e_machine == EM_PPC64); } @@ -1750,7 +1756,7 @@ yaboot_main(void) prom_printf("%s: Unable to parse\n", bootdevice); return -1; } - if (_machine == _MACH_bplan) + if (_machine == _MACH_bplan && !conf_given) boot.part++; DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n", boot.dev, boot.part, boot.file);