ramips: fix support for Redmi AC2100 (#4500)

This commit fix switch and image config for Redmi AC2100.

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
This commit is contained in:
AmadeusGhost 2020-05-01 22:37:45 +08:00 committed by GitHub
parent 01aeb5df0e
commit 3c510baf47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 14 deletions

View File

@ -45,9 +45,6 @@ yuncore,xd4200)
buffalo,wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
;;
domywifi,dw33d)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
;;
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;

View File

@ -35,6 +35,7 @@ zbtlink,zbt-wg2626)
;;
xiaomi,mir3p|\
xiaomi,mir3g|\
xiaomi,miwifi-r3|\
xiaomi,redmi-router-ac2100)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
;;

View File

@ -15,7 +15,6 @@
led-failsafe = &led_status_amber;
led-running = &led_status_white;
led-upgrade = &led_status_white;
label-mac-device = &gmac0;
};
chosen {
@ -55,10 +54,8 @@
linux,code = <KEY_RESTART>;
};
};
};
&nand {
status = "okay";
@ -152,7 +149,7 @@
&state_default {
gpio {
groups = "uart2", "uart3", "wdt";
function = "gpio";
ralink,group = "uart2", "uart3", "wdt";
ralink,function = "gpio";
};
};

View File

@ -893,7 +893,6 @@ endef
TARGET_DEVICES += xiaomi_mir3p
define Device/xiaomi_redmi-router-ac2100
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
@ -901,11 +900,11 @@ define Device/xiaomi_redmi-router-ac2100
UBINIZE_OPTS := -E 5
IMAGES += kernel1.bin rootfs0.bin
IMAGE/kernel1.bin := append-kernel
IMAGE/rootfs0.bin := append-ubi | check-size
IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Redmi Router AC2100
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e wpad-basic uboot-envtools
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e wpad-openssl uboot-envtools
endef
TARGET_DEVICES += xiaomi_redmi-router-ac2100

View File

@ -109,8 +109,6 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "4:lan" "6@eth0"
;;
xiaomi,mir3p|\
xiaomi,redmi-router-ac2100|\
hiwifi,hc5962)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
@ -153,6 +151,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
;;
xiaomi,redmi-router-ac2100)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:3" "3:lan:4" "0:wan" "6@eth0"
;;
*)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
;;
@ -236,7 +238,8 @@ ramips_setup_macs()
;;
iodata,wn-ax1167gr2|\
iodata,wn-dx1167r|\
xiaomi,mir3g-v2)
xiaomi,mir3g-v2|\
xiaomi,redmi-router-ac2100)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
label_mac=$wan_mac
;;