]> git.hungrycats.org Git - linux/commitdiff
ppc64: Add CONFIG_CMDLINE, from ppc32
authorAnton Blanchard <anton@samba.org>
Sat, 1 Jun 2002 05:17:31 +0000 (15:17 +1000)
committerAnton Blanchard <anton@samba.org>
Sat, 1 Jun 2002 05:17:31 +0000 (15:17 +1000)
arch/ppc64/config.in
arch/ppc64/kernel/setup.c

index b8f7fa01dd2a8955ee575cecdc4807070a88b3ba..ccbce3dbff0d9b98d9f0ce72034981287082a83c 100644 (file)
@@ -67,6 +67,11 @@ source drivers/parport/Config.in
 
 if [ "$CONFIG_PPC_ISERIES" != "y" ]; then
    bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
+
+   bool 'Default bootloader kernel arguments' CONFIG_CMDLINE_BOOL
+   if [ "$CONFIG_CMDLINE_BOOL" = "y" ] ; then
+     string 'Initial kernel command string' CONFIG_CMDLINE "console=ttyS0,9600 console=tty0 root=/dev/sda2"
+   fi
 fi
 
 endmenu
index 64adc361ab6bad4608ca7f7dd0b600e8b5cda89c..c0b5e5a72764a98b3b1a91684cf34805d56cf198 100644 (file)
@@ -379,10 +379,15 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
 #endif
 
        cmd_line[0] = 0;
+
+#ifdef CONFIG_CMDLINE
+       strcpy(cmd_line, CONFIG_CMDLINE);
+#endif /* CONFIG_CMDLINE */
+
        chosen = find_devices("chosen");
        if (chosen != NULL) {
                p = get_property(chosen, "bootargs", NULL);
-               if (p != NULL)
+               if (p != NULL && p[0] != 0)
                        strncpy(cmd_line, p, sizeof(cmd_line));
        }
        cmd_line[sizeof(cmd_line) - 1] = 0;