diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-09 12:52:18 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-09 12:52:18 +0000 |
commit | f42a1b166f43219853c00dc21f25b0254efbbceb (patch) | |
tree | 8fac5ee67f0a836a95385d15ae8f729d34660b9e /target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch | |
parent | f56e62651455e1a7cdae45a4a12d5258e57dbb75 (diff) | |
download | upstream-f42a1b166f43219853c00dc21f25b0254efbbceb.tar.gz upstream-f42a1b166f43219853c00dc21f25b0254efbbceb.tar.bz2 upstream-f42a1b166f43219853c00dc21f25b0254efbbceb.zip |
ar71xx: add linux 3.10
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37214 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch b/target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch new file mode 100644 index 0000000000..72a3b56649 --- /dev/null +++ b/target/linux/ar71xx/patches-3.10/508-MIPS-ath79-prom-image-command-line-hack.patch @@ -0,0 +1,57 @@ +--- a/arch/mips/ath79/prom.c ++++ b/arch/mips/ath79/prom.c +@@ -70,6 +70,35 @@ static const char * __init ath79_prom_fi + return ret; + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++extern char __image_cmdline[]; ++ ++static int __init ath79_use_image_cmdline(void) ++{ ++ char *p = __image_cmdline; ++ int replace = 0; ++ ++ if (*p == '-') { ++ replace = 1; ++ p++; ++ } ++ ++ if (*p == '\0') ++ return 0; ++ ++ if (replace) { ++ strlcpy(arcs_cmdline, p, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); ++ } ++ ++ return 1; ++} ++#else ++static inline int ath79_use_image_cmdline(void) { return 0; } ++#endif ++ + static int __init ath79_prom_init_myloader(void) + { + struct myloader_info *mylo; +@@ -98,6 +127,8 @@ static int __init ath79_prom_init_myload + + ath79_prom_append_cmdline("ethaddr", mac_buf); + ++ ath79_use_image_cmdline(); ++ + return 1; + } + +@@ -105,6 +136,9 @@ static __init void ath79_prom_init_cmdli + { + int i; + ++ if (ath79_use_image_cmdline()) ++ return; ++ + if (!is_valid_ram_addr(argv)) + return; + |