kernel: add generic image_cmdline hack to MIPS targets
authorGabor Juhos <juhosg@openwrt.org>
Thu, 10 Sep 2009 18:30:01 +0000 (18:30 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 10 Sep 2009 18:30:01 +0000 (18:30 +0000)
SVN-Revision: 17563

33 files changed:
target/linux/adm5120/router_be/config-2.6.28
target/linux/adm5120/router_be/config-2.6.30
target/linux/adm5120/router_le/config-2.6.28
target/linux/adm5120/router_le/config-2.6.30
target/linux/ar7/config-2.6.27
target/linux/ar7/config-default
target/linux/ar71xx/config-2.6.28
target/linux/ar71xx/config-2.6.30
target/linux/ar71xx/config-2.6.31
target/linux/atheros/config-2.6.28
target/linux/atheros/config-2.6.30
target/linux/au1000/au1500/config-default
target/linux/au1000/au1550/config-default
target/linux/brcm47xx/config-2.6.28
target/linux/brcm47xx/config-2.6.30
target/linux/brcm63xx/config-2.6.27
target/linux/brcm63xx/config-2.6.28
target/linux/brcm63xx/config-2.6.30
target/linux/cobalt/config-default
target/linux/generic-2.6/patches-2.6.27/021-mips_image_cmdline_hack.patch [new file with mode: 0644]
target/linux/generic-2.6/patches-2.6.27/021-mips_simple_prom_emulator.patch
target/linux/generic-2.6/patches-2.6.28/021-mips_image_cmdline_hack.patch [new file with mode: 0644]
target/linux/generic-2.6/patches-2.6.28/021-mips_simple_prom_emulator.patch
target/linux/generic-2.6/patches-2.6.30/021-mips_image_cmdline_hack.patch [new file with mode: 0644]
target/linux/generic-2.6/patches-2.6.30/021-mips_simple_prom_emulator.patch
target/linux/generic-2.6/patches-2.6.31/021-mips_image_cmdline_hack.patch [new file with mode: 0644]
target/linux/generic-2.6/patches-2.6.31/021-mips_simple_prom_emulator.patch
target/linux/ifxmips/config-2.6.27
target/linux/ifxmips/config-2.6.28
target/linux/ramips/rt288x/config-2.6.30
target/linux/ramips/rt305x/config-2.6.30
target/linux/rb532/config-default
target/linux/sibyte/config-default

index 21cd6145ce92692111c2991132d746e638803c89..4cbb744f9a8bec847a384a921d8e5897f6551b81 100644 (file)
@@ -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
index 19326577c3f1c45997ab5aa219e56372001ec90b..825ae755721b67c6a6be687da16f2c0bf5c2f3df 100644 (file)
@@ -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
index 09cf55b4cec31f12be6199cdb6e1e2cbd669f358..038b64a11dd3b7394b78a95c1c1a2129e972c711 100644 (file)
@@ -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
index a65db335d29facdb1affc7b1cfee4294ce8d22b9..73c06565d51a564f3a4c9e597e9806d4732ec3fc 100644 (file)
@@ -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
index 07efaf86b4b287123345381406c2af06e905a62a..6f419ca15522891750418d8b57693d3ccf557de1 100644 (file)
@@ -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
index 7c81c1e5223176565ca5491b051c3944825e13a7..f8c6f3c8edaeb2ec17cdf388b2899ad252a03b52 100644 (file)
@@ -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
index dd2c30d6d59998f38a6fa1beeabaadcff973321b..cad5e4da491f9361c1c087d915811e6eb624d356 100644 (file)
@@ -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"
index e193ba61a1a66ae30dd99a573947315392a190da..e948763d716605f1759768e5c36a3e38b773279f 100644 (file)
@@ -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"
index 4e09c6cb13ba8c468557c9e67b07ea7a45a2e810..34b82b8feec8c71f425ace5a3f9902c8ecc070a0 100644 (file)
@@ -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"
index 21f0edd8f9d2e206e29aa736a5a482d7ad839837..888b7f4fd3c1f6fd68cdbd0d1aa8b57df363c954 100644 (file)
@@ -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
index da589a4517dc5ecca2d8effac11d16a8ba2f55ee..11fc0220a47cdc51a75f616f9eb1a89d0c986ef1 100644 (file)
@@ -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
index e459010c50002bf0aa0d4e4cd84616303e0ec1bc..e56e533ecd8e66fbfbc7cafb9762aa6f80cb98bb 100644 (file)
@@ -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
index a3623adfe090b43a61473c8ef2211b9b0a1b32f4..daf337c7d98ac9f2a70550ce36e4f25e3a675b17 100644 (file)
@@ -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
index fd7ffeedf608a07a8cf4a270765c03395ea917e2..91920c79f994af91a1338cc43d70d829cf156eb5 100644 (file)
@@ -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
index 967c586f93b4f477707837ed13a78156ba3c9d03..77c42b61e38c211344cc26d90c68e7f02febe0ce 100644 (file)
@@ -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
index 5b3596bb5f4b6455325f7ca255beec204b0d4c16..7264d7f4cd437128bf397dd72b57ea15b511184d 100644 (file)
@@ -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
index 9f0ad2d9f0845dd6b33b717fa2ced00b03e2caf5..97df382ddff90a593be9e6841989c8a64f6ebdec 100644 (file)
@@ -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
index e6bc3d3b31aacf351db66c94ce92c819e93febd1..7834448564633004e570ad546154112fe805d980 100644 (file)
@@ -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
index cea74962aa8c757185cd79ef162dc815cfb7cb37..37a6be634e0e06adcf7bf99ac86b4bee21980a9e 100644 (file)
@@ -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 (file)
index 0000000..cd315a4
--- /dev/null
@@ -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
index 305e3fd8ddc81556031d78a96443d336cec110a4..527abc4fc58ad46d28f0ff3043f088f3bc86ba24 100644 (file)
@@ -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 (file)
index 0000000..59bc623
--- /dev/null
@@ -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
index f473b6550959d4e033976407c8cfa67fc1fdcdc6..5aa5245d6e7fe5a39fec9458fbdaf993a22978bb 100644 (file)
@@ -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 (file)
index 0000000..75dc2b0
--- /dev/null
@@ -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
index 49045fea319e1776c8dad88f5f6b0cde1daaa097..80f402c4dee6eb27576881f64247475b63d9296f 100644 (file)
@@ -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 (file)
index 0000000..6b27264
--- /dev/null
@@ -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
index b53ca3f50554001199effb65fc69df84cde910a6..3119420dd0af43be9d8b783c2261074c2fa887b8 100644 (file)
@@ -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
  
index b2fb156da96604c7586403ca9db4bc6c043b1d38..eb621132f4bd3e84cc5d487171b86b66770b67a5 100644 (file)
@@ -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
index 745cfe6057637bd3e9fe9bb6e1ce49b038d271cc..0f9da8af30593d54aaebe6000416966a470d7ab0 100644 (file)
@@ -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
index 0bab2d0d70f9bd692bce2ce0b78d095172ccd3db..dd83f64141b8c1c6e0a0dafcb36de35dac4136a2 100644 (file)
@@ -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
index 43376c52a2e2989ab9dc1b34a523015e13d53ce7..c51b4cdd1089085254268ed04366a114b7db2eb0 100644 (file)
@@ -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
index c2fb8c22d658df9f57920b7fa4297d2b6571c869..285db249f85cf243076067a6c23baf0c8d235ed8 100644 (file)
@@ -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
index 6f8e4e57e47a899adf4dce7867b9f7c9fbf40fe5..9ca2a626882843d00b3d521c69b3bd81417b1063 100644 (file)
@@ -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"