WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [PATCH] Option to override firmware bootargs

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH] Option to override firmware bootargs
From: Amos Waterland <apw@xxxxxxxxxx>
Date: Sun, 17 Sep 2006 02:40:34 -0400
Delivery-date: Sat, 16 Sep 2006 23:40:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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