[LEDE-DEV] [PATCH 1/3] ramips-mt7621: add support for Ubiquiti EdgeRouter X-SFP (UBNT-ERX-SFP)
Sven Roederer
devel-sven at geroedel.de
Wed May 3 16:41:31 PDT 2017
This is basically a copy of the regular UBNT-ERX to separate between
both models of this family.
these differences include:
- SFP-slot
- PoE ports
ERX: 1 port pass-trough; controlled by SoC-GPIO
ERX-SPF: 5 ports self-powered; controlled by I2C-GPIO-chip
add the i2c and pca95xx drivers on UBNT-ERX-SFP by default
---
target/linux/ramips/base-files/etc/board.d/02_network | 1 +
target/linux/ramips/base-files/lib/ramips.sh | 3 +++
target/linux/ramips/base-files/lib/upgrade/platform.sh | 9 ++++++---
target/linux/ramips/image/mt7621.mk | 13 +++++++++++++
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 80a3bc2..490a41e 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -165,6 +165,7 @@ ramips_setup_interfaces()
rb750gr3|\
rt-n14u|\
ubnt-erx|\
+ ubnt-erx-sfp|\
ur-326n4g|\
wrtnode|\
wrtnode2p | \
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 87cb7ff..b5f0617 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -481,6 +481,9 @@ ramips_board_detect() {
*"UBNT-ERX")
name="ubnt-erx"
;;
+ *"UBNT-ERX-SFP")
+ name="ubnt-erx-sfp"
+ ;;
*"UR-326N4G")
name="ur-326n4g"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index adad8da..d8a7c08 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -249,7 +249,8 @@ platform_check_image() {
# these boards use metadata images
return 0
;;
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
nand_do_platform_check "$board" "$1"
return $?;
;;
@@ -271,7 +272,8 @@ platform_nand_pre_upgrade() {
local board=$(ramips_board_name)
case "$board" in
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
platform_upgrade_ubnt_erx "$ARGV"
;;
esac
@@ -283,7 +285,8 @@ platform_pre_upgrade() {
case "$board" in
hc5962|\
r6220|\
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
nand_do_upgrade "$ARGV"
;;
esac
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index b57552a..22b04d9 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -176,6 +176,19 @@ define Device/ubnt-erx
endef
TARGET_DEVICES += ubnt-erx
+define Device/ubnt-erx-sfp
+ DTS := UBNT-ERX
+ FILESYSTEMS := squashfs
+ KERNEL_SIZE := 3145728
+ KERNEL := $(KERNEL_DTB) | uImage lzma
+ IMAGES := sysupgrade.tar
+ KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
+ DEVICE_TITLE := Ubiquiti EdgeRouter X-SFP
+ DEVICE_PACKAGES := -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
+endef
+TARGET_DEVICES += ubnt-erx-sfp
+
define Device/vr500
DTS := VR500
IMAGE_SIZE := 66453504
--
2.1.4
More information about the Lede-dev
mailing list