[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] [PATCH] Option to override firmware bootargs



I recently got a few hours on a Maple development board.  I wanted to
boot with an nfsroot, but I didn't want to risk changing the bootargs
saved in the PIBS firmware.  This patch lets Xen choose to override the
bootargs supplied by the firmware if the user specifies `bootargs=builtin'.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 boot_of.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -r 1d9c135673e4 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Fri Sep 15 18:20:55 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Sun Sep 17 02:02:51 2006 -0400
@@ -455,9 +455,12 @@ static void boot_of_bootargs(multiboot_i
 static void boot_of_bootargs(multiboot_info_t *mbi)
 {
     int rc;
+    char *override = NULL;
+
+    override = strstr(builtin_cmdline, "bootargs=builtin");
 
     rc = of_getprop(bof_chosen, "bootargs", &bootargs, sizeof (bootargs));
-    if (rc == OF_FAILURE || bootargs[0] == '\0') {
+    if (rc == OF_FAILURE || bootargs[0] == '\0' || override) {
         strlcpy(bootargs, builtin_cmdline, sizeof(bootargs));
     }
 

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.