[PATCH v2] Add support for Unifi AC Mesh

Christian Dresel fff at chrisi01.de
Mo Okt 30 16:36:02 CET 2017


This is the correct firmware for the Unifi AC Mesh
I have only tested at Unifi AC Mesh and not at Unifi AC lite
But my information is, that both have the same Hardware

Signed-off-by: Christian Dresel <fff at chrisi01.de>

---

v2:
 - remove CONFIG_PACKAGE_ATH_DFS=y & CONFIG_ATH_USER_REGD=y because is already in dependencies
   active
 - remove tab and use spaces
 - remove ETHMESHMAC
 - remove debug output in configurenetwork

 bsp/ar71xx/.config                                       |  2 ++
 bsp/board_ar71xx.bsp                                     |  1 +
 src/packages/fff/fff-boardname/Makefile                  |  2 +-
 .../files/etc/uci-defaults/50-fff-boardname              |  3 +++
 src/packages/fff/fff-network/Makefile                    |  2 +-
 .../fff/fff-network/ar71xx/network.ubnt-unifiac-lite     | 16 ++++++++++++++++
 .../fff/fff-network/files/usr/sbin/configurenetwork      |  4 ++++
 7 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite

diff --git a/bsp/ar71xx/.config b/bsp/ar71xx/.config
index 0a5b9b9..bf2a2f4 100644
--- a/bsp/ar71xx/.config
+++ b/bsp/ar71xx/.config
@@ -66,6 +66,8 @@ CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-nano-m=y
 CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_ubnt-nano-m=""
 CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-unifi=y
 CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_ubnt-unifi=""
+CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-unifiac-lite=y
+CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_generic_DEVICE_ubnt-unifiac-lite="-kmod-ath10k kmod-ath10k-ct"
 CONFIG_BUSYBOX_CUSTOM=y
 CONFIG_TARGET_PER_DEVICE_ROOTFS=y
 # CONFIG_BUSYBOX_CONFIG_BRCTL is not set
diff --git a/bsp/board_ar71xx.bsp b/bsp/board_ar71xx.bsp
index 1137b0d..71baba4 100644
--- a/bsp/board_ar71xx.bsp
+++ b/bsp/board_ar71xx.bsp
@@ -26,6 +26,7 @@ images=("lede-ar71xx-generic-cpe210-220-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-ubnt-unifi-squashfs-sysupgrade.bin"
+        "lede-ar71xx-generic-ubnt-unifiac-lite-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin"
         "lede-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"
diff --git a/src/packages/fff/fff-boardname/Makefile b/src/packages/fff/fff-boardname/Makefile
index 31e6731..499ae91 100644
--- a/src/packages/fff/fff-boardname/Makefile
+++ b/src/packages/fff/fff-boardname/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-boardname
-PKG_VERSION:=0.0.2
+PKG_VERSION:=3
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname b/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
index 94b9884..45d6db7 100755
--- a/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
+++ b/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
@@ -31,6 +31,9 @@ case "$BOARD" in
     unifi)
         BOARD=ubnt-unifi
         ;;
+    unifiac-lite)
+        BOARD=ubnt-unifiac-lite
+        ;;
     loco-m-xw)
         BOARD=ubnt-loco-m-xw
         ;;
diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile
index b7805c8..f0c20c6 100644
--- a/src/packages/fff/fff-network/Makefile
+++ b/src/packages/fff/fff-network/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-network
-PKG_VERSION:=8
+PKG_VERSION:=9
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite b/src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite
new file mode 100644
index 0000000..92285ca
--- /dev/null
+++ b/src/packages/fff/fff-network/ar71xx/network.ubnt-unifiac-lite
@@ -0,0 +1,16 @@
+WANDEV=eth0
+SWITCHDEV=eth0
+CLIENT_PORTS=""
+WAN_PORTS=""
+BATMAN_PORTS=""
+ONE_PORT="YES"
+
+. /etc/network.mode
+. /lib/functions/system.sh
+. /lib/functions/uci-defaults.sh
+. /lib/ar71xx.sh
+
+# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from
+
+NEWROUTERMAC=$(mtd_get_mac_binary EEPROM 0x0)
+ROUTERMAC=w2mesh
\ No newline at end of file
diff --git a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
index c6b3113..173e270 100755
--- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
+++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
@@ -184,6 +184,10 @@ if [[ -n "$ROUTERMAC" ]]; then
         echo "Fixing MAC on br-mesh (mesh)"
         sleep 10
         NEW_MACADDR=$(cat /sys/class/net/$ROUTERMAC/address)
+        # We need this to set the original MAC for the ubnt-unifiac-lite from a variable and not from an Interface
+        if [[ -n "$NEWROUTERMAC" ]]; then                                                                         
+                NEW_MACADDR=$NEWROUTERMAC                                                                                                                                                     
+        fi   
         uci set network.mesh.macaddr=$NEW_MACADDR
         uci commit
         ifconfig br-mesh down
-- 
2.11.0



Mehr Informationen über die Mailingliste franken-dev