diff options
author | John Crispin <blogic@openwrt.org> | 2015-02-15 19:45:29 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-02-15 19:45:29 +0000 |
commit | c77c54e6845c201483a75dfc931f7065d3d35c84 (patch) | |
tree | ba56f28512a840dcad307d78c1c063637a014f36 /target/linux/ar71xx/patches-3.18/508-MIPS-ath79-prom-image-command-line-hack.patch | |
parent | beb7f2ac7b5c617cd3e1b0060c15b1e71f8faa5c (diff) | |
download | master-187ad058-c77c54e6845c201483a75dfc931f7065d3d35c84.tar.gz master-187ad058-c77c54e6845c201483a75dfc931f7065d3d35c84.tar.bz2 master-187ad058-c77c54e6845c201483a75dfc931f7065d3d35c84.zip |
ar71xx: add v3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44456 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.18/508-MIPS-ath79-prom-image-command-line-hack.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.18/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.18/508-MIPS-ath79-prom-image-command-line-hack.patch b/target/linux/ar71xx/patches-3.18/508-MIPS-ath79-prom-image-command-line-hack.patch new file mode 100644 index 0000000000..72a3b56649 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/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; + |