I have an Ubiquiti RouterStation and RedBoot pass the board name
parameter ("board") initialised to "Ubiquiti AR71xx-based board". If I
boot with the command exec -c "board=UBNT-RS" the appended parameter
is ignored because the RedBoot board parameter can be correctly
parsed.
With this patch the ar71xx_prom_init_generic function tests first the
"board" parameter passed within the kernel boot command and if it
there isn't it reads the RedBoot "board" parameter.

Signed-off-by: Andrea Tassi <andrea.tassi at gmail.com> and WiFi(ed) -
The Embedded Development Team (of Riccardo Coppola <coppola.riccardo
at gmail.com>, Andrea Tassi <andrea.tassi at gmail.com> and
Massimiliano Toce <massimiliano.toce at gmail.com>)

---

--- kamikaze.orig/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c     
2009-02-04
21:23:10.000000000 +0100
+++ kamikaze/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c  2009-02-11
23:42:31.000000000 +0100
@@ -168,9 +168,9 @@
        ar71xx_prom_argv = (char **)fw_arg1;
        ar71xx_prom_envp = (char **)fw_arg2;

-       p = ar71xx_prom_getenv("board");
+       p = ar71xx_prom_getargv("board");
        if (!p)
-               p = ar71xx_prom_getargv("board");
+               p = ar71xx_prom_getenv("board");
        if (p)
                ar71xx_mach_type = find_board_byname(p);
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to