eb6011e813da60183877379b5c08c622c5cf5fa6
[oweals/openwrt.git] / target / linux / generic / hack-4.9 / 301-mips_image_cmdline_hack.patch
1 From: John Crispin <john@phrozen.org>
2 Subject: hack: kernel: add generic image_cmdline hack to MIPS targets
3
4 lede-commit: d59f5b3a987a48508257a0ddbaeadc7909f9f976
5 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
6 ---
7  arch/mips/Kconfig       | 4 ++++
8  arch/mips/kernel/head.S | 6 ++++++
9  2 files changed, 10 insertions(+)
10
11 --- a/arch/mips/Kconfig
12 +++ b/arch/mips/Kconfig
13 @@ -1158,6 +1158,10 @@ config SYNC_R4K
14  config MIPS_MACHINE
15         def_bool n
16  
17 +config IMAGE_CMDLINE_HACK
18 +       bool "OpenWrt specific image command line hack"
19 +       default n
20 +
21  config NO_IOPORT_MAP
22         def_bool n
23  
24 --- a/arch/mips/kernel/head.S
25 +++ b/arch/mips/kernel/head.S
26 @@ -79,6 +79,12 @@ FEXPORT(__kernel_entry)
27         j       kernel_entry
28  #endif
29  
30 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
31 +       .ascii  "CMDLINE:"
32 +EXPORT(__image_cmdline)
33 +       .fill   0x400
34 +#endif /* CONFIG_IMAGE_CMDLINE_HACK */
35 +
36         __REF
37  
38  NESTED(kernel_entry, 16, sp)                   # kernel entry point