diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 22:38:19 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 22:38:19 +0000 |
commit | af015f956c35717909247a5732f6862d3de1476f (patch) | |
tree | c72d67ef23e35b8dd3e8177c4811773ed6eed759 /target/linux/ar71xx/patches-3.2/508-MIPS-ath79-prom-image-command-line-hack.patch | |
parent | 386cbfe45bc521baa889a8c261b2c77e69fc956f (diff) | |
download | upstream-af015f956c35717909247a5732f6862d3de1476f.tar.gz upstream-af015f956c35717909247a5732f6862d3de1476f.tar.bz2 upstream-af015f956c35717909247a5732f6862d3de1476f.zip |
ar71xx: add initial support for 3.2
Tested on the following boards:
ALFA AP96
TL-MR3220 v1
TL-WR1043ND v1
TL-WR2543ND v1
TL-WR703N v1
TL-WR741ND v1
TL-WR741ND v4
WNDR3700 v1
WZR-HP-G300NH
SVN-Revision: 29868
Diffstat (limited to 'target/linux/ar71xx/patches-3.2/508-MIPS-ath79-prom-image-command-line-hack.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.2/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.2/508-MIPS-ath79-prom-image-command-line-hack.patch b/target/linux/ar71xx/patches-3.2/508-MIPS-ath79-prom-image-command-line-hack.patch new file mode 100644 index 0000000000..062e513a35 --- /dev/null +++ b/target/linux/ar71xx/patches-3.2/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; +@@ -95,6 +124,8 @@ static int __init ath79_prom_init_myload + + ath79_prom_append_cmdline("ethaddr", mac_buf); + ++ ath79_use_image_cmdline(); ++ + return 1; + } + +@@ -102,6 +133,9 @@ static __init void ath79_prom_init_cmdli + { + int i; + ++ if (ath79_use_image_cmdline()) ++ return; ++ + if (!is_valid_ram_addr(argv)) + return; + |