]> git.ozlabs.org Git - yaboot.git/blobdiff - second/yaboot.c
Fix netboot fucntionality to use the parameters specified.
[yaboot.git] / second / yaboot.c
index 3d93275018027376cafffb685104a0fbfea586d0..8a74d7a5de89c1749738dbe775356655968362b0 100644 (file)
@@ -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;
@@ -988,6 +989,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", &params->kernel)) {
          prom_printf("%s: Unable to parse\n", imagepath);
@@ -1009,6 +1011,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", &params->rd)) {
                    prom_printf("%s: Unable to parse\n", imagepath);
@@ -1019,6 +1022,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", &params->sysmap)) {
                    prom_printf("%s: Unable to parse\n", imagepath);
@@ -1606,7 +1610,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 +1754,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);