[OpenBIOS] r590 - trunk/openbios-devel/arch/ppc/qemu

svn at openbios.org svn at openbios.org
Tue Oct 20 01:02:10 CEST 2009


Author: laurent
Date: 2009-10-20 01:02:10 +0200 (Tue, 20 Oct 2009)
New Revision: 590

Modified:
   trunk/openbios-devel/arch/ppc/qemu/main.c
Log:
ppc: if "\\:tbxi" (mac) fails, try "ppc\bootinfo.txt" (chrp).

This is needed to load the bootloader of OpenBSD.

Signed-off-by: Laurent Vivier <Laurent at vivier.eu>


Modified: trunk/openbios-devel/arch/ppc/qemu/main.c
===================================================================
--- trunk/openbios-devel/arch/ppc/qemu/main.c	2009-09-21 23:12:02 UTC (rev 589)
+++ trunk/openbios-devel/arch/ppc/qemu/main.c	2009-10-19 23:02:10 UTC (rev 590)
@@ -205,8 +205,12 @@
 static void
 newworld_boot( void )
 {
-        static const char * const chrp_path = "\\\\:tbxi" ;
+        static const char * const chrp_path[] = { "\\\\:tbxi",
+						  "ppc\\bootinfo.txt",
+						  NULL
+						  };
         char *path = pop_fstr_copy(), *param;
+	int i;
 
 	param = strchr(path, ' ');
 	if (param) {
@@ -237,7 +241,8 @@
                     param = pop_fstr_copy();
                 }
                 try_path(path, NULL, param);
-	        try_path(path, chrp_path, param);
+                for (i = 0; chrp_path[i]; i++)
+	            try_path(path, chrp_path[i], param);
             } else {
                 uint16_t boot_device = fw_cfg_read_i16(FW_CFG_BOOT_DEVICE);
                 switch (boot_device) {
@@ -249,12 +254,14 @@
                     path = strdup("cd:");
                     break;
                 }
-	        try_path(path, chrp_path, param);
+                for (i = 0; chrp_path[i]; i++)
+	            try_path(path, chrp_path[i], param);
             }
         } else {
             NEWWORLD_DPRINTF("Entering boot, path %s\n", path);
 	    try_path(path, NULL, param);
-            try_path(path, chrp_path, param);
+            for (i = 0; chrp_path[i]; i++)
+	        try_path(path, chrp_path[i], param);
         }
 	printk("*** Boot failure! No secondary bootloader specified ***\n");
 }




More information about the OpenBIOS mailing list