[OpenWrt-Devel] [PATCH] ar71xx: add Support for RB2011UiAS-2HnD

Michael Gerlach n3ph at terminal21.de
Tue Aug 26 12:05:05 EDT 2014


---
 .../ar71xx/base-files/etc/uci-defaults/01_leds     |  3 ++-
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  5 ++--
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +++
 ...6-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch | 28 +++++++++++++++++++++
 ...6-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch | 29 ++++++++++++++++++++++
 5 files changed, 65 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/ar71xx/patches-3.10/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
 create mode 100644 target/linux/ar71xx/patches-3.14/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index d104f40..d3b766d 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -82,7 +82,8 @@ rb-750)
 rb-2011l|\
 rb-2011uas|\
 rb-2011uias|\
-rb-2011uas-2hnd)
+rb-2011uas-2hnd|\
+rb-2011uias-2hnd)
 	ucidef_set_led_switch "eth6" "ETH6" "rb:green:eth6" "switch1" "0x20"
 	ucidef_set_led_switch "eth7" "ETH7" "rb:green:eth7" "switch1" "0x10"
 	ucidef_set_led_switch "eth8" "ETH8" "rb:green:eth8" "switch1" "0x08"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 3b4b330..c5cfd67 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -66,7 +66,8 @@ db120 |\
 rb-2011l | \
 rb-2011uas |\
 rb-2011uias |\
-rb-2011uas-2hnd)
+rb-2011uas-2hnd|\
+rb-2011uias-2hnd)
 	ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
 	ucidef_add_switch "switch0" "1" "1"
 	ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
@@ -75,7 +76,7 @@ rb-2011uas-2hnd)
 	ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 4 5"
 
 	case "$board" in
-	rb-2011uas* | rb-2011uias)
+	rb-2011uas* | rb-2011uias | rb-2011uias-2hnd)
 		ucidef_set_interface_raw "sfp" "eth0.3"
 		ucidef_add_switch_vlan "switch0" "3" "0t 6"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 80a607c..1e96b6d 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -499,6 +499,9 @@ ar71xx_board_detect() {
 	*"RouterBOARD 2011UAS-2HnD")
 		name="rb-2011uas-2hnd"
 		;;
+	*"RouterBOARD 2011UiAS-2HnD")
+		name="rb-2011uias-2hnd"
+		;;
 	*"RouterBOARD SXT Lite2")
 		name="rb-sxt2n"
 		;;
diff --git a/target/linux/ar71xx/patches-3.10/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch b/target/linux/ar71xx/patches-3.10/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
new file mode 100644
index 0000000..56d8b59
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
@@ -0,0 +1,28 @@
+Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/mach-rb2011.c
++++ linux-3.10.49/arch/mips/ath79/mach-rb2011.c
+@@ -323,7 +323,9 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US
+ 
+ static void __init rb2011r5_setup(void)
+ {
+-	rb2011_setup(RB2011_FLAG_SFP | RB2011_FLAG_USB);
++	rb2011_setup(RB2011_FLAG_SFP |
++		     RB2011_FLAG_USB |
++		     RB2011_FLAG_WLAN);
+ }
+ 
+ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
+Index: linux-3.10.49/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
++++ linux-3.10.49/arch/mips/ath79/machtypes.h
+@@ -99,7 +99,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_RB_2011G,		/* Mikrotik RouterBOARD 2011UAS-2HnD */
+ 	ATH79_MACH_RB_2011L,		/* Mikrotik RouterBOARD 2011L */
+ 	ATH79_MACH_RB_2011US,		/* Mikrotik RouterBOARD 2011UAS */
+-	ATH79_MACH_RB_2011R5,		/* Mikrotik RouterBOARD 2011UiAS */
++	ATH79_MACH_RB_2011R5,		/* Mikrotik RouterBOARD 2011UiAS / 2011UiAS-2HnD */
+ 	ATH79_MACH_RB_SXTLITE2ND,	/* Mikrotik RouterBOARD SXT Lite 2nD */
+ 	ATH79_MACH_RB_SXTLITE5ND,	/* Mikrotik RouterBOARD SXT Lite 5nD */
+ 	ATH79_MACH_RW2458N,		/* Redwave RW2458N */
diff --git a/target/linux/ar71xx/patches-3.14/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch b/target/linux/ar71xx/patches-3.14/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
new file mode 100644
index 0000000..cb2189a
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.14/726-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
@@ -0,0 +1,29 @@
+Index: linux-3.14.13/arch/mips/ath79/mach-rb2011.c
+===================================================================
+--- linux-3.14.13.orig/arch/mips/ath79/mach-rb2011.c
++++ linux-3.14.13/arch/mips/ath79/mach-rb2011.c
+@@ -323,7 +323,9 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US
+ 
+ static void __init rb2011r5_setup(void)
+ {
+-	rb2011_setup(RB2011_FLAG_SFP | RB2011_FLAG_USB);
++	rb2011_setup(RB2011_FLAG_SFP |
++		     RB2011_FLAG_USB |
++		     RB2011_FLAG_WLAN);
+ }
+ 
+ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
+Index: linux-3.14.13/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.14.13.orig/arch/mips/ath79/machtypes.h
++++ linux-3.14.13/arch/mips/ath79/machtypes.h
+@@ -99,7 +99,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_RB_2011G,		/* Mikrotik RouterBOARD 2011UAS-2HnD */
+ 	ATH79_MACH_RB_2011L,		/* Mikrotik RouterBOARD 2011L */
+ 	ATH79_MACH_RB_2011US,		/* Mikrotik RouterBOARD 2011UAS */
+-	ATH79_MACH_RB_2011R5,		/* Mikrotik RouterBOARD 2011UiAS */
++	ATH79_MACH_RB_2011R5,		/* Mikrotik RouterBOARD 2011UiAS / 2011UiAS-2HnD */
+ 	ATH79_MACH_RB_SXTLITE2ND,	/* Mikrotik RouterBOARD SXT Lite 2nD */
+ 	ATH79_MACH_RB_SXTLITE5ND,	/* Mikrotik RouterBOARD SXT Lite 5nD */
+ 	ATH79_MACH_RW2458N,		/* Redwave RW2458N */
+
-- 
1.8.5.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list