diff -ur -x .* -x*.o -x zImage* -x vmlinu* linuxppc_2_4_devel/arch/ppc/boot/prep/misc.c linuxppc_2_4_devel-140/arch/ppc/boot/prep/misc.c
--- linuxppc_2_4_devel/arch/ppc/boot/prep/misc.c	Sat Sep 22 17:41:04 2001
+++ linuxppc_2_4_devel-140/arch/ppc/boot/prep/misc.c	Sun Sep 23 15:30:15 2001
@@ -113,13 +113,66 @@
 }
 #endif /* CONFIG_VGA_CONSOLE */
 
+void
+read_args(void)
+{
+	int timer;
+	char *cp, ch;
+
+	puts("\nLinux/PPC load: ");
+	timer = 0;
+	cp = cmd_line;
+	memcpy (cmd_line, cmd_preset, sizeof(cmd_preset));
+	while ( *cp ) putc(*cp++);
+	while (timer++ < 5*1000) {
+		if (tstc()) {
+			while ((ch = getc()) != '\n' && ch != '\r') {
+				/* Test for backspace/delete */
+				if (ch == '\b' || ch == '\177') {
+					if (cp != cmd_line) {
+						cp--;
+						puts("\b \b");
+					}
+				/* Test for ^x/^u (and wipe the line) */
+				} else if (ch == '\030' || ch == '\025') {
+					while (cp != cmd_line) {
+						cp--;
+						puts("\b \b");
+					}
+				} else {
+					*cp++ = ch;
+					putc(ch);
+				}
+			}
+			break;  /* Exit 'timer' loop */
+		}
+		udelay(1000);  /* 1 msec */
+	}
+	*cp = 0;
+	puts("\n");
+}
+
+int
+get_of_args(void *OFW_interface)
+{
+	int chosen, size, res;
+
+	/* Get ``bootargs'' property of ``/chosen'' node */
+	res = of_finddevice("/chosen", &chosen);
+	if (res) return res;
+
+	return of_getprop(chosen, 
+			 "bootargs", 
+			 cmd_buf, 
+			 sizeof(cmd_buf), 
+			 &size); /* we don't use this */
+}
+
 unsigned long
 decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
 		  RESIDUAL *residual, void *OFW_interface)
 {
-	int timer;
 	extern unsigned long start;
-	char *cp, ch;
 	unsigned long TotalMemory;
 	int dev_handle;
 	int mem_info[2];
@@ -137,6 +190,20 @@
 	vga_init((unsigned char *)0xC0000000);
 #endif /* CONFIG_VGA_CONSOLE */
 
+	/* Initialise the OpenFirmware but only if the entry point
+	 * is in a sane location...
+	 */
+	if (OFW_interface) {
+	       if ((unsigned long)OFW_interface < 0x10000000) {
+			/* Restore the slightly inaccurate
+			 * MSR so that OpenFirmware will behave. -- Tom
+			 */
+			_put_MSR(orig_MSR);
+			of_init(OFW_interface);
+	       } else
+		       OFW_interface = 0;
+	}
+
 	if (residual)
 	{
 		/* Is this Motorola PPCBug? */
@@ -196,14 +263,8 @@
 		 * we don't try this on a PReP box without OF
 		 *     -- Cort
 		 */
-		while (OFW_interface && ((unsigned long)OFW_interface < 0x10000000) )
+		while (OFW_interface)
 		{
-			/* We need to restore the slightly inaccurate
-			 * MSR so that OpenFirmware will behave. -- Tom
-			 */
-			_put_MSR(orig_MSR);
-			of_init(OFW_interface);
-
 			/* get handle to memory description */
 			res = of_finddevice("/memory@0", 
 					    &dev_handle);
@@ -227,8 +288,6 @@
 		hold_residual->TotalMemory = TotalMemory;
 		residual = hold_residual;
 
-		/* Enforce a sane MSR for booting. */
-		_put_MSR(MSR_IP);
         }
 
 	/* assume the chunk below 8M is free */
@@ -314,43 +373,21 @@
 	if (keyb_present)
 		CRT_tstc();  /* Forces keyboard to be initialized */
 
-	puts("\nLinux/PPC load: ");
-	timer = 0;
-	cp = cmd_line;
-	memcpy (cmd_line, cmd_preset, sizeof(cmd_preset));
-	while ( *cp ) putc(*cp++);
-	while (timer++ < 5*1000) {
-		if (tstc()) {
-			while ((ch = getc()) != '\n' && ch != '\r') {
-				/* Test for backspace/delete */
-				if (ch == '\b' || ch == '\177') {
-					if (cp != cmd_line) {
-						cp--;
-						puts("\b \b");
-					}
-				/* Test for ^x/^u (and wipe the line) */
-				} else if (ch == '\030' || ch == '\025') {
-					while (cp != cmd_line) {
-						cp--;
-						puts("\b \b");
-					}
-				} else {
-					*cp++ = ch;
-					putc(ch);
-				}
-			}
-			break;  /* Exit 'timer' loop */
-		}
-		udelay(1000);  /* 1 msec */
-	}
-	*cp = 0;
-	puts("\n");
+	/* If we have OF then try to get the args from there.  If we don't
+	 * have OF, or we failed to get them from OF, read them manually
+	 */
+	if (!OFW_interface || get_of_args(OFW_interface))
+		read_args();
 
 	/* mappings on early boot can only handle 16M */
 	if ( (u32)(cmd_line) > (16<<20))
 		puts("cmd_line located > 16M\n");
 	if ( (int)hold_residual > (16<<20))
 		puts("hold_residual located > 16M\n");
+
+	/* Enforce a sane MSR for booting. */
+	if (OFW_interface)
+		_put_MSR(MSR_IP);
 
 	puts("Uncompressing Linux...");
 	
