Add NAND flash/YAFFS2 patches for RB532 by David Goodenough Read the kernel command...
[openwrt/openwrt.git] / target / linux / rb532-2.6 / patches / 140-cmdline_hack.patch
1 diff -ur linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S
2 --- linux.old/arch/mips/kernel/head.S 2006-10-26 00:11:13.000000000 +0200
3 +++ linux.dev/arch/mips/kernel/head.S 2006-10-26 02:40:10.000000000 +0200
4 @@ -132,6 +132,8 @@
5
6 j kernel_entry
7 nop
8 + nop
9 +EXPORT(_image_cmdline)
10
11 /*
12 * Reserved space for exception handlers.
13 diff -ur linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c
14 --- linux.old/arch/mips/rb500/prom.c 2006-10-26 00:11:14.000000000 +0200
15 +++ linux.dev/arch/mips/rb500/prom.c 2006-10-26 02:40:46.000000000 +0200
16 @@ -128,6 +128,7 @@
17 /* FIXME: STUB */
18 }
19
20 +extern char _image_cmdline;
21 void __init prom_setup_cmdline(void){
22 char cmd_line[CL_SIZE];
23 char *cp;
24 @@ -163,6 +164,9 @@
25 strcpy(cp,prom_argv[i]);
26 cp+=strlen(prom_argv[i]);
27 }
28 + *(cp++) = ' ';
29 + strcpy(cp,&_image_cmdline);
30 + cp += strlen(&_image_cmdline);
31
32 i=strlen(arcs_cmdline);
33 if (i>0){