aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-09-10 18:30:06 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-09-10 18:30:06 +0000
commit211b8fd286c699d91e3c85488e40429a5d08e907 (patch)
tree95109ee02be9d449a73d72905db2b5baa6bb8c2b /target/linux
parentd59f5b3a987a48508257a0ddbaeadc7909f9f976 (diff)
downloadupstream-211b8fd286c699d91e3c85488e40429a5d08e907.tar.gz
upstream-211b8fd286c699d91e3c85488e40429a5d08e907.tar.bz2
upstream-211b8fd286c699d91e3c85488e40429a5d08e907.zip
adm5120: use the generic image_cmdline hack
SVN-Revision: 17564
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/common/prom.c10
-rw-r--r--target/linux/adm5120/patches-2.6.28/140-cmdline_hack.patch15
-rw-r--r--target/linux/adm5120/patches-2.6.30/140-cmdline_hack.patch15
-rw-r--r--target/linux/adm5120/router_le/config-2.6.282
-rw-r--r--target/linux/adm5120/router_le/config-2.6.302
5 files changed, 9 insertions, 35 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/common/prom.c b/target/linux/adm5120/files/arch/mips/adm5120/common/prom.c
index 85b61ab8a4..5b2e45defe 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/common/prom.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/common/prom.c
@@ -237,18 +237,22 @@ static void __init prom_detect_machtype(void)
adm5120_mach_type = MACH_ADM5120_GENERIC;
}
-/* TODO: this is an ugly hack for RouterBOARDS */
-extern char _image_cmdline;
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
+extern char __image_cmdline[];
+
static void __init prom_init_cmdline(void)
{
char *cmd;
/* init command line, register a default kernel command line */
- cmd = &_image_cmdline + 8;
+ cmd = __image_cmdline;
if (strlen(cmd) > 0)
strlcpy(arcs_cmdline, cmd, sizeof(arcs_cmdline));
}
+#else
+static void inline prom_init_cmdline(void) {}
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
#define UART_READ(r) \
__raw_readl((void __iomem *)(KSEG1ADDR(ADM5120_UART0_BASE)+(r)))
diff --git a/target/linux/adm5120/patches-2.6.28/140-cmdline_hack.patch b/target/linux/adm5120/patches-2.6.28/140-cmdline_hack.patch
deleted file mode 100644
index 14172fcaf9..0000000000
--- a/target/linux/adm5120/patches-2.6.28/140-cmdline_hack.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/arch/mips/kernel/head.S
-+++ b/arch/mips/kernel/head.S
-@@ -127,7 +127,12 @@
- /*
- * Reserved space for exception handlers.
- * Necessary for machines which link their kernels at KSEG0.
-+ * Use as temporary storage for the kernel command line, so that it
-+ * can be updated easily without having to relink the kernel.
- */
-+
-+EXPORT(_image_cmdline)
-+ .ascii "CMDLINE:"
- .fill 0x400
- #endif
-
diff --git a/target/linux/adm5120/patches-2.6.30/140-cmdline_hack.patch b/target/linux/adm5120/patches-2.6.30/140-cmdline_hack.patch
deleted file mode 100644
index 14172fcaf9..0000000000
--- a/target/linux/adm5120/patches-2.6.30/140-cmdline_hack.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/arch/mips/kernel/head.S
-+++ b/arch/mips/kernel/head.S
-@@ -127,7 +127,12 @@
- /*
- * Reserved space for exception handlers.
- * Necessary for machines which link their kernels at KSEG0.
-+ * Use as temporary storage for the kernel command line, so that it
-+ * can be updated easily without having to relink the kernel.
- */
-+
-+EXPORT(_image_cmdline)
-+ .ascii "CMDLINE:"
- .fill 0x400
- #endif
-
diff --git a/target/linux/adm5120/router_le/config-2.6.28 b/target/linux/adm5120/router_le/config-2.6.28
index 038b64a11d..3bd82df7c9 100644
--- a/target/linux/adm5120/router_le/config-2.6.28
+++ b/target/linux/adm5120/router_le/config-2.6.28
@@ -124,7 +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_IMAGE_CMDLINE_HACK=y
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 73c06565d5..519c7d62d5 100644
--- a/target/linux/adm5120/router_le/config-2.6.30
+++ b/target/linux/adm5120/router_le/config-2.6.30
@@ -135,7 +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_IMAGE_CMDLINE_HACK=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y