Add support for Xiaomi Mi Router 4A (100m)

This currently includes a patch to add the label-mac alias in the
devices DTS file, which is also submitted upstream.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Fabian Bläse 2021-07-12 15:26:10 +02:00
parent 256ac6a6c6
commit 5509ae287e
6 changed files with 40 additions and 1 deletions

View File

@ -3,4 +3,5 @@ subtarget=mt76x8
images=("openwrt-${chipset}-${subtarget}-tplink_archer-c50-v3-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c50-v4-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr841n-v13-squashfs-*"
"openwrt-${chipset}-${subtarget}-xiaomi_mi-router-4a-100m-squashfs-*"
)

View File

@ -10,6 +10,8 @@ CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=""
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=""
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=""
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set

View File

@ -0,0 +1,25 @@
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Mon, 19 Jul 2021 21:54:29 +0200
Subject: [PATCH] ramips: add missing label-mac-device for Xiaomi Mi Router 4A
(100M)
As both the Mi Router 4A (100M) and the Mi Router 4C use the same
label-mac-device, the alias can be moved to the shared dtsi.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
---
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
index 0f5897f5c593..d3f5e33be732 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
@@ -11,6 +11,7 @@
led-failsafe = &led_power_yellow;
led-running = &led_power_blue;
led-upgrade = &led_power_yellow;
+ label-mac-device = &ethernet;
};
chosen {

View File

@ -11,7 +11,8 @@ get_cpu_port() {
tplink,archer-c50-v4|\
tplink,tl-wr1043nd-v2|\
tplink,tl-wr1043nd-v3|\
tplink,tl-wr841n-v13)
tplink,tl-wr841n-v13|\
xiaomi,mi-router-4a-100m)
CPUPORT="6t"
;;
netgear,r6220|\

View File

@ -42,6 +42,9 @@ get_port_order() {
tplink,tl-wr841-v8)
PORTORDER="2 3 4 1"
;;
xiaomi,mi-router-4a-100m)
PORTORDER="0 2 4"
;;
esac
echo "$PORTORDER"

View File

@ -0,0 +1,7 @@
. /lib/functions/fff/network
WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="6t 4"
WAN_PORTS="6t 0"
BATMAN_PORTS="6t 2"