From 86598e636326ac57d99fbeb3b0b9fbf7442ab9ba Mon Sep 17 00:00:00 2001 From: blogic Date: Mon, 16 Apr 2012 12:31:48 +0000 Subject: [lantiq] adds 3.3 patches and files git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31307 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../0009-MIPS-lantiq-fix-cmdline-parsing.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 target/linux/lantiq/patches-3.3/0009-MIPS-lantiq-fix-cmdline-parsing.patch (limited to 'target/linux/lantiq/patches-3.3/0009-MIPS-lantiq-fix-cmdline-parsing.patch') diff --git a/target/linux/lantiq/patches-3.3/0009-MIPS-lantiq-fix-cmdline-parsing.patch b/target/linux/lantiq/patches-3.3/0009-MIPS-lantiq-fix-cmdline-parsing.patch new file mode 100644 index 000000000..261b8e22e --- /dev/null +++ b/target/linux/lantiq/patches-3.3/0009-MIPS-lantiq-fix-cmdline-parsing.patch @@ -0,0 +1,36 @@ +From 3ea88c1089b88b4860919a9cdea0cc5da4d09e2c Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 12 Aug 2011 16:27:38 +0200 +Subject: [PATCH 09/70] MIPS: lantiq: fix cmdline parsing + +The code tested if the KSEG1 mapped address of argv was != 0. We need to use +CPHYSADDR instead to make the conditional actually work. + +Signed-off-by: Thomas Langer +Signed-off-by: John Crispin +--- + arch/mips/lantiq/prom.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c +index e3b1e25..acb8921 100644 +--- a/arch/mips/lantiq/prom.c ++++ b/arch/mips/lantiq/prom.c +@@ -49,10 +49,12 @@ static void __init prom_init_cmdline(void) + char **argv = (char **) KSEG1ADDR(fw_arg1); + int i; + ++ arcs_cmdline[0] = '\0'; ++ + for (i = 0; i < argc; i++) { +- char *p = (char *) KSEG1ADDR(argv[i]); ++ char *p = (char *) KSEG1ADDR(argv[i]); + +- if (p && *p) { ++ if (CPHYSADDR(p) && *p) { + strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); + strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); + } +-- +1.7.9.1 + -- cgit v1.2.3