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-changelog

[Xen-changelog] [xen-unstable] [POWERPC] add support for builtin command

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC] add support for builtin command line
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 18:20:29 +0000
Delivery-date: Wed, 09 Aug 2006 11:23:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Amos Waterland <apw@xxxxxxxxxx>
# Node ID 00a41d1daf899b8d4bc906138aa74098a2042ae3
# Parent  ecd673684ec8aaccc9bfedf4ef1784730619892c
[POWERPC] add support for builtin command line
Support expressing Xen command line arguments at make invocation.  Use
same section name as Linux's zImage and reserve a certain amount of
space so that arguments can be manipulated by external tools.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/Makefile  |    3 +++
 xen/arch/powerpc/boot_of.c |    8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff -r ecd673684ec8 -r 00a41d1daf89 xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Fri Aug 04 17:25:29 2006 -0400
+++ b/xen/arch/powerpc/Makefile Mon Aug 07 17:16:18 2006 -0500
@@ -83,6 +83,9 @@ physdev.o: ../x86/physdev.c
 
 HDRS += $(wildcard *.h)
 
+CMDLINE = "xen"
+boot_of.o: CFLAGS += -DCMDLINE="\"$(CMDLINE)\""
+
 start.o: boot/start.S
        $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
 
diff -r ecd673684ec8 -r 00a41d1daf89 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Fri Aug 04 17:25:29 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Mon Aug 07 17:16:18 2006 -0500
@@ -36,6 +36,10 @@ static int of_out;
 static int of_out;
 static ofdn_t boot_cpu;
 static char bootargs[256];
+
+#define COMMAND_LINE_SIZE 512
+static char builtin_cmdline[COMMAND_LINE_SIZE]
+    __attribute__((section("__builtin_cmdline"))) = CMDLINE;
 
 extern struct ns16550_defaults ns16550;
 
@@ -449,8 +453,8 @@ static void boot_of_bootargs(multiboot_i
     int rc;
 
     rc = of_getprop(bof_chosen, "bootargs", &bootargs, sizeof (bootargs));
-    if (rc == OF_FAILURE) {
-        strcpy(bootargs, "xen");
+    if (rc == OF_FAILURE || bootargs[0] == '\0') {
+        strlcpy(bootargs, builtin_cmdline, sizeof(bootargs));
     }
 
     mbi->flags |= MBI_CMDLINE;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [POWERPC] add support for builtin command line, Xen patchbot-unstable <=