[LEDE-DEV] [PATCH] ar71xx: Add support for D-Link EBR-2310 Rev. C

Alexandru Gagniuc mr.nuke.me at gmail.com
Sat Feb 4 01:12:57 PST 2017


Add support for the EBR-2310, which is almost identical to the DIR-615
rev E4, without the wifi.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds                   | 3 ++-
 target/linux/ar71xx/base-files/etc/board.d/02_network                | 5 +++++
 .../ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration  | 1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh                         | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh               | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c          | 3 +++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h                | 1 +
 target/linux/ar71xx/image/legacy-devices.mk                          | 5 +++++
 target/linux/ar71xx/image/legacy.mk                                  | 1 +
 9 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index b1ecb02..11f2280 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -238,7 +238,8 @@ dhp-1565-a1)
 	;;
 dir-600-a1|\
 dir-615-e1|\
-dir-615-e4)
+dir-615-e4|\
+ebr-2310-c1)
 	ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
 	ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
 	ucidef_set_led_switch "lan2" "LAN2" "d-link:green:lan2" "switch0" "0x04"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 976440e..13649c3 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -305,6 +305,11 @@ ar71xx_setup_interfaces()
 			"0 at eth0" "2:lan" "3:lan" "4:lan"
 		ucidef_add_switch_attr "switch0" "enable" "false"
 		;;
+	ebr-2310-c1)
+		ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
+		;;
 	el-m150)
 		ucidef_set_interfaces_lan_wan "eth1" "eth0"
 		ucidef_add_switch "switch0" \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index f1b3ae1..0558848 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -58,6 +58,7 @@ dir-600-a1|\
 dir-615-c1|\
 dir-615-e1|\
 dir-615-e4|\
+ebr-2310-c1|\
 ja76pf|\
 rb-750|\
 rb-751|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3ca2c0d..0577c34 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -607,6 +607,9 @@ ar71xx_board_detect() {
 	*EAP7660D)
 		name="eap7660d"
 		;;
+	*"EBR-2310 rev. C1")
+		name="ebr-2310-c1"
+		;;
 	*EL-M150)
 		name="el-m150"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index cf2aab2..0b3da06 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -233,6 +233,7 @@ platform_check_image() {
 	dlan-pro-500-wp|\
 	dr531|\
 	dragino2|\
+	ebr-2310-c1|\
 	epg5000|\
 	esr1750|\
 	esr900|\
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
index 321fdce..5e6134d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
@@ -141,6 +141,9 @@ static void __init dir_600_a1_setup(void)
 MIPS_MACHINE(ATH79_MACH_DIR_600_A1, "DIR-600-A1", "D-Link DIR-600 rev. A1",
 	     dir_600_a1_setup);
 
+MIPS_MACHINE(ATH79_MACH_EBR_2310_C1, "EBR-2310-C1", "D-Link EBR-2310 rev. C1",
+	     dir_600_a1_setup);
+
 static void __init dir_615_e1_setup(void)
 {
 	dir_600_a1_setup();
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 12e81db..23ed6dd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -88,6 +88,7 @@ enum ath79_mach_type {
 	ATH79_MACH_EAP120,			/* TP-LINK EAP120 */
 	ATH79_MACH_EAP300V2,			/* EnGenius EAP300 v2 */
 	ATH79_MACH_EAP7660D,			/* Senao EAP7660D */
+	ATH79_MACH_EBR_2310_C1,			/* D-link EBR-2310 rev. C1 */
 	ATH79_MACH_EL_M150,			/* EasyLink EL-M150 */
 	ATH79_MACH_EL_MINI,			/* EasyLink EL-MINI */
 	ATH79_MACH_EPG5000,			/* EnGenius EPG5000 */
diff --git a/target/linux/ar71xx/image/legacy-devices.mk b/target/linux/ar71xx/image/legacy-devices.mk
index 2535c03..e40de53 100644
--- a/target/linux/ar71xx/image/legacy-devices.mk
+++ b/target/linux/ar71xx/image/legacy-devices.mk
@@ -225,6 +225,11 @@ define LegacyDevice/FR54RTR
 endef
 LEGACY_DEVICES += FR54RTR
 
+define LegacyDevice/EBR2310C1
+  DEVICE_TITLE := D-Link EBR-2310 rev. C1
+endef
+LEGACY_DEVICES += EBR2310C1
+
 define LegacyDevice/DIR615E1
   DEVICE_TITLE := D-Link DIR-615 rev. E1
 endef
diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk
index d2f05e9..b21ecdb 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -925,6 +925,7 @@ $(eval $(call SingleProfile,CameoAP91,64kraw,DIR600A1,dir-600-a1,DIR-600-A1,ttyS
 $(eval $(call SingleProfile,CameoAP91,64kraw,DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02"))
 $(eval $(call SingleProfile,CameoAP91,64kraw,FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01"))
 
+$(eval $(call SingleProfile,CameoAP99,64kraw,EBR2310C1,ebr-2310-c1,EBR-2310-C1,ttyS0,115200,"AP91-AR7240-RT-090223-03"))
 $(eval $(call SingleProfile,CameoAP99,64kraw,DIR615E1,dir-615-e1,DIR-615-E1,ttyS0,115200,"AP93-AR7240-RT-081028-00"))
 $(eval $(call SingleProfile,CameoAP99,64kraw,DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05"))
 
-- 
2.9.3




More information about the Lede-dev mailing list