Skip to content

Commit

Permalink
Support for Mikrotik LDF 5AC (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
aanon4 committed May 18, 2023
1 parent 65dab4c commit 62a19a2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
1 change: 1 addition & 0 deletions SUPPORTED_DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ LHG 5 ac | RBLHGG-5acD | 5 | ipq40xx | mikrotik | mikrotik_lhgg-5acd | 256MB | s
LHG XL 5 ac | RBLHGG-5acD-XL | 5 | ipq40xx | mikrotik | mikrotik_lhgg-5acd-xl | 256MB | stable | released
LDF 2 | RBLDF-2nD | 2 | ath79 | mikrotik | mikrotik-ldf-2nd | 64MB | stable | nightly
LDF 5 | RBLDF-5nD | 5 | ath79 | mikrotik | mikrotik-ldf-5nd | 64MB | stable | released
LDF 5 ac | RBLDFG-5acD | 5 | ipq40xx | mikrotik | mikrotik-ldf-5acd | 64MB | stable | nightly
RB911G-2HPnD <br> mANTBox 2 12s | RB911G-2HPnD <br> RB911G-2HPnD-12S | 2 | ath79 | mikrotik | - | 64MB | unknown | released
RB911G-5HPnD | RB911G-5HPnD | 5 | ath79 | mikrotik | - | 64MB | unknown | released
QRT 5 | RB911G-5HPnD-QRT | 5 | ath79 | mikrotik | mikrotik-911g-5hpnd-qrt | 64MB | stable | danger-upgrade
Expand Down
1 change: 1 addition & 0 deletions configs/ipq40xx-mikrotik.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_hap-ac3=y
CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_lhgg-5acd=y
CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_lhgg-5acd-xl=y
CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_sxtsq-5-ac=y
CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_ldf-5acd=y

#
# Mikrotik use initramfs to install
Expand Down
3 changes: 3 additions & 0 deletions files/etc/radios.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
"MikroTik RouterBOARD LDF 2nD" : {
"maxpower" : "28"
},
"MikroTik LDF 5 ac (RBLDFG-5acD)": {
"maxpower" : "25"
},
"MikroTik RouterBOARD RBLDF-5nD" : {
"maxpower" : "25"
},
Expand Down
1 change: 1 addition & 0 deletions files/etc/uci-defaults/11_compat_version
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ case "$(/usr/local/bin/get_boardid)" in
MikroTik\ hAP\ ac2|\
MikroTik\ hAP\ ac3|\
MikroTik\ SXTsq\ 5\ ac*|\
MikroTik\ LDF\ 5\ ac*|\
MikroTik\ LHG\ 5\ ac*)
sed -i "s/^compat_version = 1.0/compat_version = 1.1/" /etc/config.mesh/_setup
sed -i "s/^compat_version = 1.0/compat_version = 1.1/" /etc/config.mesh/_setup.default
Expand Down
36 changes: 30 additions & 6 deletions patches/747-mikrotik-extra-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,19 @@
+};
--- a/target/linux/ipq40xx/image/mikrotik.mk
+++ b/target/linux/ipq40xx/image/mikrotik.mk
@@ -62,3 +62,19 @@
@@ -62,3 +62,27 @@
DEVICE_PACKAGES := rssileds
endef
TARGET_DEVICES += mikrotik_sxtsq-5-ac
+
+define Device/mikrotik_ldf-5acd
+ $(call Device/mikrotik_nor)
+ DEVICE_MODEL := RouterBOARD LDF 5 AC (RBLDFG-5acD)
+ SOC := qcom-ipq4018
+ DEVICE_PACKAGES := rssileds
+endef
+TARGET_DEVICES += mikrotik_ldf-5acd
+
+define Device/mikrotik_lhgg-5acd
+ $(call Device/mikrotik_nor)
+ DEVICE_MODEL := RouterBOARD LHG 5 AC
Expand All @@ -259,19 +267,21 @@
+TARGET_DEVICES += mikrotik_lhgg-5acd-xl
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -35,6 +35,7 @@
@@ -35,6 +35,8 @@
zyxel,wre6606)
ucidef_set_interface_lan "eth0"
;;
+ mikrotik,lhgg-5acd*|\
+ mikrotik,ldf-5acd|\
mikrotik,sxtsq-5-ac)
ucidef_set_interfaces_lan_wan "lan" "lan.1"
ucidef_set_interface "wifi" device "wlan0" protocol "static"
@@ -216,6 +217,7 @@
@@ -216,6 +217,8 @@
label_mac="$wan_mac"
;;
mikrotik,lhgg-60ad|\
+ mikrotik,lhgg-5acd*|\
+ mikrotik,ldf-5acd|\
mikrotik,sxtsq-5-ac)
lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
label_mac="$lan_mac"
Expand Down Expand Up @@ -528,31 +538,45 @@
+ compatible = "mikrotik,lhgg-5acd-xl";
+ model = "MikroTik LHG 5 ac XL (RBLHGG-5acD-XL)";
+};
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ldf-5acd.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "qcom-ipq4018-sxtsq-5-ac.dts"
+
+/ {
+ compatible = "mikrotik,ldf-5acd";
+ model = "MikroTik LDF 5 ac (RBLDFG-5acD)";
+};
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -197,6 +197,7 @@
@@ -197,6 +197,8 @@
mikrotik,cap-ac |\
mikrotik,hap-ac2 |\
mikrotik,hap-ac3 |\
+ mikrotik,lhgg-5acd* |\
+ mikrotik,ldf-5acd |\
mikrotik,sxtsq-5-ac)
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \
@@ -236,6 +237,7 @@
@@ -236,6 +237,8 @@
mikrotik,cap-ac |\
mikrotik,hap-ac2 |\
mikrotik,hap-ac3 |\
+ mikrotik,lhgg-5acd* |\
+ mikrotik,ldf-5acd |\
mikrotik,sxtsq-5-ac)
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0xaf20 0x2f20 ) || \
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -163,12 +163,13 @@
@@ -163,12 +163,14 @@
;;
mikrotik,cap-ac|\
mikrotik,hap-ac2|\
+ mikrotik,lhgg-5acd*|\
+ mikrotik,ldf-5acd|\
mikrotik,lhgg-60ad|\
mikrotik,sxtsq-5-ac)
[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
Expand Down

0 comments on commit 62a19a2

Please sign in to comment.