kernel: add missing symbols to the 2.6.31 config
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.30 / 021-mips_image_cmdline_hack.patch
1 --- a/arch/mips/kernel/setup.c
2 +++ b/arch/mips/kernel/setup.c
3 @@ -546,8 +546,28 @@ static void __init resource_init(void)
4 }
5 }
6
7 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
8 +static void __init process__image_cmdline(void)
9 +{
10 + extern char __image_cmdline[];
11 +
12 + if (__image_cmdline[0] == '\0')
13 + return;
14 +
15 + if (__image_cmdline[0] == '-') {
16 + strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
17 + } else {
18 + strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
19 + strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
20 + }
21 +}
22 +#else
23 +static void inline process__image_cmdline(void) {}
24 +#endif
25 +
26 void __init setup_arch(char **cmdline_p)
27 {
28 + process__image_cmdline();
29 cpu_probe();
30 prom_init();
31
32 --- a/arch/mips/Kconfig
33 +++ b/arch/mips/Kconfig
34 @@ -806,6 +806,10 @@ config SYNC_R4K
35 config MIPS_MACHINE
36 def_bool n
37
38 +config IMAGE_CMDLINE_HACK
39 + bool "OpenWrt specific image command line hack"
40 + default n
41 +
42 config NO_IOPORT
43 def_bool n
44
45 --- a/arch/mips/kernel/head.S
46 +++ b/arch/mips/kernel/head.S
47 @@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
48 j kernel_entry
49 #endif
50
51 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
52 + .ascii "CMDLINE:"
53 +EXPORT(__image_cmdline)
54 + .fill 0x400
55 +#endif /* CONFIG_IMAGE_CMDLINE_HACK */
56 +
57 __REF
58
59 NESTED(kernel_entry, 16, sp) # kernel entry point
This page took 0.052038 seconds and 5 git commands to generate.