diff -urNX /home/leigh/.diffex linux-2.4.22-prev/arch/ppc/boot/prep/head.S linux-2.4.22/arch/ppc/boot/prep/head.S
--- linux-2.4.22-prev/arch/ppc/boot/prep/head.S	Mon Aug 25 16:46:29 2003
+++ linux-2.4.22/arch/ppc/boot/prep/head.S	Mon Aug 25 16:50:57 2003
@@ -14,6 +14,17 @@
  *      Jump to the kernel entry
  *            -- Cort
  */
+
+#define CMD_BUF_LEN	256
+	.globl	cmd_buf		/* cmd_buf is here so that it can easily */
+cmd_buf:			/* be modified by an external tool       */
+#ifdef CONFIG_CMDLINE
+	.asciz	CONFIG_CMDLINE
+	.balign	256,0
+#else
+	.space	CMD_BUF_LEN,0
+#endif
+
 	.globl	start
 start:
 	bl	start_
@@ -44,8 +55,8 @@
 	mtmsr	r3
 
 	/* compute the size of the whole image in words. */
-	lis	r4,start@h
-	ori	r4,r4,start@l
+	lis	r4,cmd_buf@h
+	ori	r4,r4,cmd_buf@l
 	lis	r5,end@h
 	ori	r5,r5,end@l
 	addi	r5,r5,3		/* round up */
@@ -56,7 +67,7 @@
 	/* check if we need to relocate ourselves to the link addr or were
 	 * we loaded there to begin with -- Cort */
 	mflr	r3
-	subi	r3,r3,4		/* we get the nip, not the ip of the branch */
+	subi	r3,r3,CMD_BUF_LEN+4	/* adjust nip->ip, + cmd_buf length */
 	mr	r8,r3
 	cmp	0,r3,r4
 	beq	start_ldr	/* If 0, we don't need to relocate */
@@ -64,11 +75,11 @@
  * no matter where we're loaded, move ourselves to -Ttext address
  */
 relocate:
-	mflr	r3		/* Compute code bias */
-	subi	r3,r3,4
+	mflr	r3			/* Compute code bias */
+	subi	r3,r3,CMD_BUF_LEN+4	/* adjust nip->ip, + cmd_buf length */
 	mr	r8,r3
-	lis	r4,start@h
-	ori	r4,r4,start@l
+	lis	r4,cmd_buf@h
+	ori	r4,r4,cmd_buf@l
 	mr	r5,r7		/* Get the # of longwords again */
 	mtctr	r5		/* Setup for loop */
 	li	r6,0
diff -urNX /home/leigh/.diffex linux-2.4.22-prev/arch/ppc/boot/prep/misc.c linux-2.4.22/arch/ppc/boot/prep/misc.c
--- linux-2.4.22-prev/arch/ppc/boot/prep/misc.c	Mon Aug 25 16:47:59 2003
+++ linux-2.4.22/arch/ppc/boot/prep/misc.c	Mon Aug 25 16:50:57 2003
@@ -21,12 +21,6 @@
 #include "nonstdio.h"
 #include "zlib.h"
 
-#ifdef CONFIG_CMDLINE
-#define CMDLINE CONFIG_CMDLINE
-#else
-#define CMDLINE ""
-#endif
-
 #if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_VGA_CONSOLE)
 #define INTERACTIVE_CONSOLE	1
 #endif
@@ -46,8 +40,7 @@
 extern char __ramdisk_begin, __ramdisk_end;
 extern char _end[];
 
-char cmd_preset[] = CMDLINE;
-char cmd_buf[256];
+extern char cmd_buf[256];
 char *cmd_line = cmd_buf;
 
 int keyb_present = 1;	/* keyboard controller is present by default */
@@ -302,7 +295,6 @@
 
 	puts("\nLinux/PPC load: ");
 	cp = cmd_line;
-	memcpy (cmd_line, cmd_preset, sizeof(cmd_preset));
 	while ( *cp )
 		putc(*cp++);
 #ifdef INTERACTIVE_CONSOLE
diff -urNX /home/leigh/.diffex linux-2.4.22-prev/arch/ppc/boot/utils/mkprep.c linux-2.4.22/arch/ppc/boot/utils/mkprep.c
--- linux-2.4.22-prev/arch/ppc/boot/utils/mkprep.c	Mon Aug 25 16:47:59 2003
+++ linux-2.4.22/arch/ppc/boot/utils/mkprep.c	Mon Aug 25 16:50:57 2003
@@ -162,10 +162,10 @@
 
   /* set entry point and boot image size skipping over elf header */
 #ifdef __i386__
-  *entry = 0x400/*+65536*/;
+  *entry = 0x500/*+65536*/;
   *length = info.st_size-elfhdr_size+0x400;
 #else
-  *entry = cpu_to_le32(0x400/*+65536*/);
+  *entry = cpu_to_le32(0x500/*+65536*/);
   *length = cpu_to_le32(info.st_size-elfhdr_size+0x400);
 #endif /* __i386__ */
 

