kernel: split patches folder up into backport, pending and hack folders
[openwrt/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 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
12 index 6a56d75f7e8b..03fbb7b46e7f 100644
13 --- a/arch/mips/Kconfig
14 +++ b/arch/mips/Kconfig
15 @@ -1149,6 +1149,10 @@ config SYNC_R4K
16 config MIPS_MACHINE
17 def_bool n
18
19 +config IMAGE_CMDLINE_HACK
20 + bool "OpenWrt specific image command line hack"
21 + default n
22 +
23 config NO_IOPORT_MAP
24 def_bool n
25
26 diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
27 index cf052204eb0a..f7327fae5473 100644
28 --- a/arch/mips/kernel/head.S
29 +++ b/arch/mips/kernel/head.S
30 @@ -79,6 +79,12 @@ FEXPORT(__kernel_entry)
31 j kernel_entry
32 #endif
33
34 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
35 + .ascii "CMDLINE:"
36 +EXPORT(__image_cmdline)
37 + .fill 0x400
38 +#endif /* CONFIG_IMAGE_CMDLINE_HACK */
39 +
40 __REF
41
42 NESTED(kernel_entry, 16, sp) # kernel entry point
43 --
44 2.11.0
45