The kernel should be compiled big-endian
[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-12-06 17:30:27.000000000 +0100
3 +++ linux.dev/arch/mips/kernel/head.S 2006-12-06 18:34:43.000000000 +0100
4 @@ -129,15 +129,20 @@
5 #endif
6 .endm
7
8 -
9 j kernel_entry
10 nop
11 -
12 + nop
13 +
14 /*
15 * Reserved space for exception handlers.
16 * Necessary for machines which link their kernels at KSEG0.
17 + * Use as temporary storage for the kernel command line, so that it
18 + * can be updated easily without having to relink the kernel.
19 */
20 - .fill 0x400
21 +
22 +EXPORT(_image_cmdline)
23 + .ascii "CMDLINE:"
24 + .fill 0x3ec
25
26 EXPORT(stext) # used for profiling
27 EXPORT(_stext)
28 diff -ur linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c
29 --- linux.old/arch/mips/rb500/prom.c 2006-12-06 17:30:27.000000000 +0100
30 +++ linux.dev/arch/mips/rb500/prom.c 2006-12-06 17:41:40.000000000 +0100
31 @@ -128,6 +128,7 @@
32 /* FIXME: STUB */
33 }
34
35 +extern char _image_cmdline;
36 void __init prom_setup_cmdline(void){
37 char cmd_line[CL_SIZE];
38 char *cp;
39 @@ -163,6 +164,9 @@
40 strcpy(cp,prom_argv[i]);
41 cp+=strlen(prom_argv[i]);
42 }
43 + *(cp++) = ' ';
44 + strcpy(cp,(&_image_cmdline + 8));
45 + cp += strlen(&_image_cmdline);
46
47 i=strlen(arcs_cmdline);
48 if (i>0){
This page took 0.049977 seconds and 5 git commands to generate.