diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-07-19 17:58:40 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-07-19 17:58:40 +0000 |
commit | 78b1a6b773aaebdeff6f6b43df98598749e44930 (patch) | |
tree | 1cacb1c7de856ee70af780d86e6c70b9559bb247 /target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch | |
parent | d26e8d9439052ed8f433b6ffb15a5f0c54712121 (diff) | |
download | upstream-78b1a6b773aaebdeff6f6b43df98598749e44930.tar.gz upstream-78b1a6b773aaebdeff6f6b43df98598749e44930.tar.bz2 upstream-78b1a6b773aaebdeff6f6b43df98598749e44930.zip |
ar71xx: add 4.1 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
SVN-Revision: 46426
Diffstat (limited to 'target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch')
-rw-r--r-- | target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch b/target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch new file mode 100644 index 0000000000..061268a125 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/506-MIPS-ath79-prom-parse-redboot-args.patch @@ -0,0 +1,42 @@ +--- a/arch/mips/ath79/prom.c ++++ b/arch/mips/ath79/prom.c +@@ -21,10 +21,39 @@ + + #include "common.h" + ++static char ath79_cmdline_buf[COMMAND_LINE_SIZE] __initdata; ++ ++static void __init ath79_prom_append_cmdline(const char *name, ++ const char *value) ++{ ++ snprintf(ath79_cmdline_buf, sizeof(ath79_cmdline_buf), ++ " %s=%s", name, value); ++ strlcat(arcs_cmdline, ath79_cmdline_buf, sizeof(arcs_cmdline)); ++} ++ + void __init prom_init(void) + { ++ const char *env; ++ + fw_init_cmdline(); + ++ env = fw_getenv("ethaddr"); ++ if (env) ++ ath79_prom_append_cmdline("ethaddr", env); ++ ++ env = fw_getenv("board"); ++ if (env) { ++ /* Workaround for buggy bootloaders */ ++ if (strcmp(env, "RouterStation") == 0 || ++ strcmp(env, "Ubiquiti AR71xx-based board") == 0) ++ env = "UBNT-RS"; ++ ++ if (strcmp(env, "RouterStation PRO") == 0) ++ env = "UBNT-RSPRO"; ++ ++ ath79_prom_append_cmdline("board", env); ++ } ++ + #ifdef CONFIG_BLK_DEV_INITRD + /* Read the initrd address from the firmware environment */ + initrd_start = fw_getenvl("initrd_start"); |