diff --git a/target/linux/adm5120/router_be/config-2.6.28 b/target/linux/adm5120/router_be/config-2.6.28 index 21cd6145ce9..4cbb744f9a8 100644 --- a/target/linux/adm5120/router_be/config-2.6.28 +++ b/target/linux/adm5120/router_be/config-2.6.28 @@ -95,6 +95,7 @@ CONFIG_HZ=250 CONFIG_HZ_250=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/adm5120/router_be/config-2.6.30 b/target/linux/adm5120/router_be/config-2.6.30 index 19326577c3f..825ae755721 100644 --- a/target/linux/adm5120/router_be/config-2.6.30 +++ b/target/linux/adm5120/router_be/config-2.6.30 @@ -107,6 +107,7 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/adm5120/router_le/config-2.6.28 b/target/linux/adm5120/router_le/config-2.6.28 index 09cf55b4cec..038b64a11dd 100644 --- a/target/linux/adm5120/router_le/config-2.6.28 +++ b/target/linux/adm5120/router_le/config-2.6.28 @@ -124,6 +124,7 @@ CONFIG_HZ_250=y # CONFIG_IDE is not set CONFIG_IEEE80211=m CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/adm5120/router_le/config-2.6.30 b/target/linux/adm5120/router_le/config-2.6.30 index a65db335d29..73c06565d51 100644 --- a/target/linux/adm5120/router_le/config-2.6.30 +++ b/target/linux/adm5120/router_le/config-2.6.30 @@ -135,6 +135,7 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/ar7/config-2.6.27 b/target/linux/ar7/config-2.6.27 index 07efaf86b4b..6f419ca1552 100644 --- a/target/linux/ar7/config-2.6.27 +++ b/target/linux/ar7/config-2.6.27 @@ -76,6 +76,7 @@ CONFIG_HAVE_OPROFILE=y CONFIG_HW_RANDOM=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y # CONFIG_ISDN is not set diff --git a/target/linux/ar7/config-default b/target/linux/ar7/config-default index 7c81c1e5223..f8c6f3c8eda 100644 --- a/target/linux/ar7/config-default +++ b/target/linux/ar7/config-default @@ -77,6 +77,7 @@ CONFIG_HAVE_MLOCK=y CONFIG_HAVE_OPROFILE=y CONFIG_HW_RANDOM=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y # CONFIG_ISDN is not set diff --git a/target/linux/ar71xx/config-2.6.28 b/target/linux/ar71xx/config-2.6.28 index dd2c30d6d59..cad5e4da491 100644 --- a/target/linux/ar71xx/config-2.6.28 +++ b/target/linux/ar71xx/config-2.6.28 @@ -98,6 +98,7 @@ CONFIG_I2C_BOARDINFO=y CONFIG_I2C_GPIO=y CONFIG_ICPLUS_PHY=y # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_SOURCE="../../root" diff --git a/target/linux/ar71xx/config-2.6.30 b/target/linux/ar71xx/config-2.6.30 index e193ba61a1a..e948763d716 100644 --- a/target/linux/ar71xx/config-2.6.30 +++ b/target/linux/ar71xx/config-2.6.30 @@ -110,6 +110,7 @@ CONFIG_I2C_ALGOBIT=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_GPIO=y CONFIG_ICPLUS_PHY=y +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_SOURCE="../../root" diff --git a/target/linux/ar71xx/config-2.6.31 b/target/linux/ar71xx/config-2.6.31 index 4e09c6cb13b..34b82b8feec 100644 --- a/target/linux/ar71xx/config-2.6.31 +++ b/target/linux/ar71xx/config-2.6.31 @@ -110,6 +110,7 @@ CONFIG_I2C_ALGOBIT=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_GPIO=y CONFIG_ICPLUS_PHY=y +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_SOURCE="../../root" diff --git a/target/linux/atheros/config-2.6.28 b/target/linux/atheros/config-2.6.28 index 21f0edd8f9d..888b7f4fd3c 100644 --- a/target/linux/atheros/config-2.6.28 +++ b/target/linux/atheros/config-2.6.28 @@ -74,6 +74,7 @@ CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IP175C_PHY=y CONFIG_IRQ_CPU=y diff --git a/target/linux/atheros/config-2.6.30 b/target/linux/atheros/config-2.6.30 index da589a4517d..11fc0220a47 100644 --- a/target/linux/atheros/config-2.6.30 +++ b/target/linux/atheros/config-2.6.30 @@ -87,6 +87,7 @@ CONFIG_HAVE_OPROFILE=y CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IP175C_PHY=y CONFIG_IRQ_CPU=y diff --git a/target/linux/au1000/au1500/config-default b/target/linux/au1000/au1500/config-default index e459010c500..e56e533ecd8 100644 --- a/target/linux/au1000/au1500/config-default +++ b/target/linux/au1000/au1500/config-default @@ -93,6 +93,7 @@ CONFIG_I2C_ALGOPCA=m CONFIG_I2C_ALGOPCF=m CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=m +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_KEXEC=y diff --git a/target/linux/au1000/au1550/config-default b/target/linux/au1000/au1550/config-default index a3623adfe09..daf337c7d98 100644 --- a/target/linux/au1000/au1550/config-default +++ b/target/linux/au1000/au1550/config-default @@ -97,6 +97,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IFB=m +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m CONFIG_INITRAMFS_ROOT_GID=1000 diff --git a/target/linux/brcm47xx/config-2.6.28 b/target/linux/brcm47xx/config-2.6.28 index fd7ffeedf60..91920c79f99 100644 --- a/target/linux/brcm47xx/config-2.6.28 +++ b/target/linux/brcm47xx/config-2.6.28 @@ -79,6 +79,7 @@ CONFIG_HZ=250 CONFIG_HZ_250=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_IP_ROUTE_VERBOSE is not set CONFIG_IRQ_CPU=y diff --git a/target/linux/brcm47xx/config-2.6.30 b/target/linux/brcm47xx/config-2.6.30 index 967c586f93b..77c42b61e38 100644 --- a/target/linux/brcm47xx/config-2.6.30 +++ b/target/linux/brcm47xx/config-2.6.30 @@ -90,6 +90,7 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_IP_ROUTE_VERBOSE is not set CONFIG_IRQ_CPU=y diff --git a/target/linux/brcm63xx/config-2.6.27 b/target/linux/brcm63xx/config-2.6.27 index 5b3596bb5f4..7264d7f4cd4 100644 --- a/target/linux/brcm63xx/config-2.6.27 +++ b/target/linux/brcm63xx/config-2.6.27 @@ -100,6 +100,7 @@ CONFIG_HZ=250 CONFIG_HZ_250=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/brcm63xx/config-2.6.28 b/target/linux/brcm63xx/config-2.6.28 index 9f0ad2d9f08..97df382ddff 100644 --- a/target/linux/brcm63xx/config-2.6.28 +++ b/target/linux/brcm63xx/config-2.6.28 @@ -94,6 +94,7 @@ CONFIG_HZ=250 CONFIG_HZ_250=y # CONFIG_I2C is not set # CONFIG_IDE is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/brcm63xx/config-2.6.30 b/target/linux/brcm63xx/config-2.6.30 index e6bc3d3b31a..78344485646 100644 --- a/target/linux/brcm63xx/config-2.6.30 +++ b/target/linux/brcm63xx/config-2.6.30 @@ -106,6 +106,7 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y diff --git a/target/linux/cobalt/config-default b/target/linux/cobalt/config-default index cea74962aa8..37a6be634e0 100644 --- a/target/linux/cobalt/config-default +++ b/target/linux/cobalt/config-default @@ -170,6 +170,7 @@ CONFIG_HZ_250=y # CONFIG_I2C is not set CONFIG_I8253=y CONFIG_I8259=y +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_INET_XFRM_MODE_BEET=y diff --git a/target/linux/generic-2.6/patches-2.6.27/021-mips_image_cmdline_hack.patch b/target/linux/generic-2.6/patches-2.6.27/021-mips_image_cmdline_hack.patch new file mode 100644 index 00000000000..cd315a4cfbd --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.27/021-mips_image_cmdline_hack.patch @@ -0,0 +1,59 @@ +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -545,8 +545,28 @@ static void __init resource_init(void) + } + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++static void __init process__image_cmdline(void) ++{ ++ extern char __image_cmdline[]; ++ ++ if (__image_cmdline[0] == '\0') ++ return; ++ ++ if (__image_cmdline[0] == '-') { ++ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } ++} ++#else ++static void inline process__image_cmdline(void) {} ++#endif ++ + void __init setup_arch(char **cmdline_p) + { ++ process__image_cmdline(); + cpu_probe(); + prom_init(); + +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -771,6 +771,10 @@ config SYNC_R4K + config MIPS_MACHINE + def_bool n + ++config IMAGE_CMDLINE_HACK ++ bool "OpenWrt specific image command line hack" ++ default n ++ + config NO_IOPORT + def_bool n + +--- a/arch/mips/kernel/head.S ++++ b/arch/mips/kernel/head.S +@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry) + j kernel_entry + #endif + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++ .ascii "CMDLINE:" ++EXPORT(__image_cmdline) ++ .fill 0x400 ++#endif /* CONFIG_IMAGE_CMDLINE_HACK */ ++ + __REF + + NESTED(kernel_entry, 16, sp) # kernel entry point diff --git a/target/linux/generic-2.6/patches-2.6.27/021-mips_simple_prom_emulator.patch b/target/linux/generic-2.6/patches-2.6.27/021-mips_simple_prom_emulator.patch index 305e3fd8ddc..527abc4fc58 100644 --- a/target/linux/generic-2.6/patches-2.6.27/021-mips_simple_prom_emulator.patch +++ b/target/linux/generic-2.6/patches-2.6.27/021-mips_simple_prom_emulator.patch @@ -8,13 +8,13 @@ +config PROM_EMU + def_bool n - config NO_IOPORT - def_bool n + config IMAGE_CMDLINE_HACK + bool "OpenWrt specific image command line hack" --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S -@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry) - j kernel_entry - #endif +@@ -149,6 +149,15 @@ EXPORT(__image_cmdline) + .fill 0x400 + #endif /* CONFIG_IMAGE_CMDLINE_HACK */ +#ifdef CONFIG_PROM_EMU +EXPORT(prom_emu_argv) @@ -28,7 +28,7 @@ __REF NESTED(kernel_entry, 16, sp) # kernel entry point -@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel +@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel LONG_S zero, (t0) bne t0, t1, 1b diff --git a/target/linux/generic-2.6/patches-2.6.28/021-mips_image_cmdline_hack.patch b/target/linux/generic-2.6/patches-2.6.28/021-mips_image_cmdline_hack.patch new file mode 100644 index 00000000000..59bc6233e9a --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.28/021-mips_image_cmdline_hack.patch @@ -0,0 +1,59 @@ +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -545,8 +545,28 @@ static void __init resource_init(void) + } + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++static void __init process__image_cmdline(void) ++{ ++ extern char __image_cmdline[]; ++ ++ if (__image_cmdline[0] == '\0') ++ return; ++ ++ if (__image_cmdline[0] == '-') { ++ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } ++} ++#else ++static void inline process__image_cmdline(void) {} ++#endif ++ + void __init setup_arch(char **cmdline_p) + { ++ process__image_cmdline(); + cpu_probe(); + prom_init(); + +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -766,6 +766,10 @@ config SYNC_R4K + config MIPS_MACHINE + def_bool n + ++config IMAGE_CMDLINE_HACK ++ bool "OpenWrt specific image command line hack" ++ default n ++ + config NO_IOPORT + def_bool n + +--- a/arch/mips/kernel/head.S ++++ b/arch/mips/kernel/head.S +@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry) + j kernel_entry + #endif + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++ .ascii "CMDLINE:" ++EXPORT(__image_cmdline) ++ .fill 0x400 ++#endif /* CONFIG_IMAGE_CMDLINE_HACK */ ++ + __REF + + NESTED(kernel_entry, 16, sp) # kernel entry point diff --git a/target/linux/generic-2.6/patches-2.6.28/021-mips_simple_prom_emulator.patch b/target/linux/generic-2.6/patches-2.6.28/021-mips_simple_prom_emulator.patch index f473b655095..5aa5245d6e7 100644 --- a/target/linux/generic-2.6/patches-2.6.28/021-mips_simple_prom_emulator.patch +++ b/target/linux/generic-2.6/patches-2.6.28/021-mips_simple_prom_emulator.patch @@ -8,13 +8,13 @@ +config PROM_EMU + def_bool n - config NO_IOPORT - def_bool n + config IMAGE_CMDLINE_HACK + bool "OpenWrt specific image command line hack" --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S -@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry) - j kernel_entry - #endif +@@ -149,6 +149,15 @@ EXPORT(__image_cmdline) + .fill 0x400 + #endif /* CONFIG_IMAGE_CMDLINE_HACK */ +#ifdef CONFIG_PROM_EMU +EXPORT(prom_emu_argv) @@ -28,7 +28,7 @@ __REF NESTED(kernel_entry, 16, sp) # kernel entry point -@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel +@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel LONG_S zero, (t0) bne t0, t1, 1b diff --git a/target/linux/generic-2.6/patches-2.6.30/021-mips_image_cmdline_hack.patch b/target/linux/generic-2.6/patches-2.6.30/021-mips_image_cmdline_hack.patch new file mode 100644 index 00000000000..75dc2b06826 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.30/021-mips_image_cmdline_hack.patch @@ -0,0 +1,59 @@ +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -546,8 +546,28 @@ static void __init resource_init(void) + } + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++static void __init process__image_cmdline(void) ++{ ++ extern char __image_cmdline[]; ++ ++ if (__image_cmdline[0] == '\0') ++ return; ++ ++ if (__image_cmdline[0] == '-') { ++ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } ++} ++#else ++static void inline process__image_cmdline(void) {} ++#endif ++ + void __init setup_arch(char **cmdline_p) + { ++ process__image_cmdline(); + cpu_probe(); + prom_init(); + +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -806,6 +806,10 @@ config SYNC_R4K + config MIPS_MACHINE + def_bool n + ++config IMAGE_CMDLINE_HACK ++ bool "OpenWrt specific image command line hack" ++ default n ++ + config NO_IOPORT + def_bool n + +--- a/arch/mips/kernel/head.S ++++ b/arch/mips/kernel/head.S +@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry) + j kernel_entry + #endif + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++ .ascii "CMDLINE:" ++EXPORT(__image_cmdline) ++ .fill 0x400 ++#endif /* CONFIG_IMAGE_CMDLINE_HACK */ ++ + __REF + + NESTED(kernel_entry, 16, sp) # kernel entry point diff --git a/target/linux/generic-2.6/patches-2.6.30/021-mips_simple_prom_emulator.patch b/target/linux/generic-2.6/patches-2.6.30/021-mips_simple_prom_emulator.patch index 49045fea319..80f402c4dee 100644 --- a/target/linux/generic-2.6/patches-2.6.30/021-mips_simple_prom_emulator.patch +++ b/target/linux/generic-2.6/patches-2.6.30/021-mips_simple_prom_emulator.patch @@ -8,13 +8,13 @@ +config PROM_EMU + def_bool n - config NO_IOPORT - def_bool n + config IMAGE_CMDLINE_HACK + bool "OpenWrt specific image command line hack" --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S -@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry) - j kernel_entry - #endif +@@ -149,6 +149,15 @@ EXPORT(__image_cmdline) + .fill 0x400 + #endif /* CONFIG_IMAGE_CMDLINE_HACK */ +#ifdef CONFIG_PROM_EMU +EXPORT(prom_emu_argv) @@ -28,7 +28,7 @@ __REF NESTED(kernel_entry, 16, sp) # kernel entry point -@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel +@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel LONG_S zero, (t0) bne t0, t1, 1b diff --git a/target/linux/generic-2.6/patches-2.6.31/021-mips_image_cmdline_hack.patch b/target/linux/generic-2.6/patches-2.6.31/021-mips_image_cmdline_hack.patch new file mode 100644 index 00000000000..6b27264162c --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.31/021-mips_image_cmdline_hack.patch @@ -0,0 +1,59 @@ +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -546,8 +546,28 @@ static void __init resource_init(void) + } + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++static void __init process__image_cmdline(void) ++{ ++ extern char __image_cmdline[]; ++ ++ if (__image_cmdline[0] == '\0') ++ return; ++ ++ if (__image_cmdline[0] == '-') { ++ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline)); ++ } ++} ++#else ++static void inline process__image_cmdline(void) {} ++#endif ++ + void __init setup_arch(char **cmdline_p) + { ++ process__image_cmdline(); + cpu_probe(); + prom_init(); + +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -840,6 +840,10 @@ config SYNC_R4K + config MIPS_MACHINE + def_bool n + ++config IMAGE_CMDLINE_HACK ++ bool "OpenWrt specific image command line hack" ++ default n ++ + config NO_IOPORT + def_bool n + +--- a/arch/mips/kernel/head.S ++++ b/arch/mips/kernel/head.S +@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry) + j kernel_entry + #endif + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++ .ascii "CMDLINE:" ++EXPORT(__image_cmdline) ++ .fill 0x400 ++#endif /* CONFIG_IMAGE_CMDLINE_HACK */ ++ + __REF + + NESTED(kernel_entry, 16, sp) # kernel entry point diff --git a/target/linux/generic-2.6/patches-2.6.31/021-mips_simple_prom_emulator.patch b/target/linux/generic-2.6/patches-2.6.31/021-mips_simple_prom_emulator.patch index b53ca3f5055..3119420dd0a 100644 --- a/target/linux/generic-2.6/patches-2.6.31/021-mips_simple_prom_emulator.patch +++ b/target/linux/generic-2.6/patches-2.6.31/021-mips_simple_prom_emulator.patch @@ -8,13 +8,13 @@ +config PROM_EMU + def_bool n - config NO_IOPORT - def_bool n + config IMAGE_CMDLINE_HACK + bool "OpenWrt specific image command line hack" --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S -@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry) - j kernel_entry - #endif +@@ -149,6 +149,15 @@ EXPORT(__image_cmdline) + .fill 0x400 + #endif /* CONFIG_IMAGE_CMDLINE_HACK */ +#ifdef CONFIG_PROM_EMU +EXPORT(prom_emu_argv) @@ -28,7 +28,7 @@ __REF NESTED(kernel_entry, 16, sp) # kernel entry point -@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel +@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel LONG_S zero, (t0) bne t0, t1, 1b diff --git a/target/linux/ifxmips/config-2.6.27 b/target/linux/ifxmips/config-2.6.27 index b2fb156da96..eb621132f4b 100644 --- a/target/linux/ifxmips/config-2.6.27 +++ b/target/linux/ifxmips/config-2.6.27 @@ -87,6 +87,7 @@ CONFIG_IFXMIPS_MII0=y CONFIG_IFXMIPS_PROM_ASC1=y CONFIG_IFXMIPS_SSC=y CONFIG_IFXMIPS_WDT=y +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_KALLSYMS=y diff --git a/target/linux/ifxmips/config-2.6.28 b/target/linux/ifxmips/config-2.6.28 index 745cfe60576..0f9da8af305 100644 --- a/target/linux/ifxmips/config-2.6.28 +++ b/target/linux/ifxmips/config-2.6.28 @@ -81,6 +81,7 @@ CONFIG_IFXMIPS_MII0=y CONFIG_IFXMIPS_PROM_ASC1=y CONFIG_IFXMIPS_SSC=y CONFIG_IFXMIPS_WDT=y +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_KALLSYMS=y diff --git a/target/linux/ramips/rt288x/config-2.6.30 b/target/linux/ramips/rt288x/config-2.6.30 index 0bab2d0d70f..dd83f64141b 100644 --- a/target/linux/ramips/rt288x/config-2.6.30 +++ b/target/linux/ramips/rt288x/config-2.6.30 @@ -76,6 +76,7 @@ CONFIG_HAVE_OPROFILE=y CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=m # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y # CONFIG_ISDN is not set diff --git a/target/linux/ramips/rt305x/config-2.6.30 b/target/linux/ramips/rt305x/config-2.6.30 index 43376c52a2e..c51b4cdd108 100644 --- a/target/linux/ramips/rt305x/config-2.6.30 +++ b/target/linux/ramips/rt305x/config-2.6.30 @@ -75,6 +75,7 @@ CONFIG_HAVE_MLOCK=y CONFIG_HAVE_OPROFILE=y CONFIG_HW_RANDOM=m # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y # CONFIG_ISDN is not set diff --git a/target/linux/rb532/config-default b/target/linux/rb532/config-default index c2fb8c22d65..285db249f85 100644 --- a/target/linux/rb532/config-default +++ b/target/linux/rb532/config-default @@ -94,6 +94,7 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_KEXEC=y diff --git a/target/linux/sibyte/config-default b/target/linux/sibyte/config-default index 6f8e4e57e47..9ca2a626882 100644 --- a/target/linux/sibyte/config-default +++ b/target/linux/sibyte/config-default @@ -99,6 +99,7 @@ CONFIG_I2C_SIBYTE=y CONFIG_I2C=y # CONFIG_IDE is not set # CONFIG_IEEE80211 is not set +# CONFIG_IMAGE_CMDLINE_HACK is not set CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_SOURCE="../../root"