|
@@ -0,0 +1,520 @@
|
|
|
+From 2d50fec513fa86b93942881186526e27d00dde0c Mon Sep 17 00:00:00 2001
|
|
|
+From: upnd <[email protected]>
|
|
|
+Date: Thu, 6 Apr 2023 16:22:04 +0800
|
|
|
+Subject: [PATCH] mediatek: add support for Xiaomi WR30U
|
|
|
+
|
|
|
+---
|
|
|
+ target/linux/mediatek/base-files/sbin/smp.sh | 1 +
|
|
|
+ .../dts/mediatek/mt7981-xiaomi-wr30u-112M.dts | 64 +++++
|
|
|
+ .../mediatek/mt7981-xiaomi-wr30u-base.dtsi | 223 ++++++++++++++++++
|
|
|
+ .../boot/dts/mediatek/mt7981-xiaomi-wr30u.dts | 79 +++++++
|
|
|
+ target/linux/mediatek/image/mt7981.mk | 34 +++
|
|
|
+ .../mt7981/base-files/etc/board.d/01_leds | 5 +
|
|
|
+ .../mt7981/base-files/etc/board.d/02_network | 9 +
|
|
|
+ .../mt7981/base-files/lib/upgrade/platform.sh | 2 +
|
|
|
+ 8 files changed, 417 insertions(+)
|
|
|
+ create mode 100644 target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-112M.dts
|
|
|
+ create mode 100644 target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-base.dtsi
|
|
|
+ create mode 100644 target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u.dts
|
|
|
+
|
|
|
+diff --git a/target/linux/mediatek/base-files/sbin/smp.sh b/target/linux/mediatek/base-files/sbin/smp.sh
|
|
|
+index 5cdb7e5eb4d..8ccef249f50 100755
|
|
|
+--- a/target/linux/mediatek/base-files/sbin/smp.sh
|
|
|
++++ b/target/linux/mediatek/base-files/sbin/smp.sh
|
|
|
+@@ -713,6 +713,7 @@ setup_model()
|
|
|
+ *7986*)
|
|
|
+ MT7986_whnat $num_of_wifi
|
|
|
+ ;;
|
|
|
++ *wr30u* |\
|
|
|
+ *mt3000* |\
|
|
|
+ *x3000* |\
|
|
|
+ *xe3000* |\
|
|
|
+diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-112M.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-112M.dts
|
|
|
+new file mode 100644
|
|
|
+index 00000000000..9c73b3b0fc0
|
|
|
+--- /dev/null
|
|
|
++++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-112M.dts
|
|
|
+@@ -0,0 +1,64 @@
|
|
|
++/dts-v1/;
|
|
|
++#include "mt7981-xiaomi-wr30u-base.dtsi"
|
|
|
++
|
|
|
++/ {
|
|
|
++ nmbm_spim_nand {
|
|
|
++ compatible = "generic,nmbm";
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <1>;
|
|
|
++
|
|
|
++ lower-mtd-device = <&spi_nand>;
|
|
|
++ forced-create;
|
|
|
++
|
|
|
++ partitions {
|
|
|
++ compatible = "fixed-partitions";
|
|
|
++ #address-cells = <0x01>;
|
|
|
++ #size-cells = <0x01>;
|
|
|
++
|
|
|
++ partition@0 {
|
|
|
++ label = "BL2";
|
|
|
++ reg = <0x00 0x100000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@100000 {
|
|
|
++ label = "Nvram";
|
|
|
++ reg = <0x100000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@140000 {
|
|
|
++ label = "Bdata";
|
|
|
++ reg = <0x140000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@180000 {
|
|
|
++ label = "Factory";
|
|
|
++ reg = <0x180000 0x200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@380000 {
|
|
|
++ label = "FIP";
|
|
|
++ reg = <0x380000 0x200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@580000 {
|
|
|
++ label = "crash";
|
|
|
++ reg = <0x580000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@5c0000 {
|
|
|
++ label = "crash_log";
|
|
|
++ reg = <0x5c0000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@600000 {
|
|
|
++ label = "ubi";
|
|
|
++ reg = <0x600000 0x7000000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@7600000 {
|
|
|
++ label = "KF";
|
|
|
++ reg = <0x7600000 0x40000>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
+diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-base.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-base.dtsi
|
|
|
+new file mode 100644
|
|
|
+index 00000000000..5d13117a21f
|
|
|
+--- /dev/null
|
|
|
++++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u-base.dtsi
|
|
|
+@@ -0,0 +1,223 @@
|
|
|
++/dts-v1/;
|
|
|
++#include "mt7981.dtsi"
|
|
|
++
|
|
|
++/ {
|
|
|
++ model = "Xiaomi WR30U";
|
|
|
++ compatible = "xiaomi,wr30u", "mediatek,mt7981";
|
|
|
++
|
|
|
++ chosen {
|
|
|
++ bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
|
|
++ };
|
|
|
++
|
|
|
++ memory {
|
|
|
++ reg = <0 0x40000000 0 0x10000000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ leds {
|
|
|
++ compatible = "gpio-leds";
|
|
|
++
|
|
|
++ led_sys_blue {
|
|
|
++ label = "led_blue";
|
|
|
++ gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
|
|
++ default-state = "off";
|
|
|
++ };
|
|
|
++
|
|
|
++ led_sys_yellow {
|
|
|
++ label = "led_yellow";
|
|
|
++ gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
|
|
++ default-state = "on";
|
|
|
++ };
|
|
|
++
|
|
|
++ led_net_blue {
|
|
|
++ label = "net_blue";
|
|
|
++ gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
|
|
++ default-state = "off";
|
|
|
++ };
|
|
|
++
|
|
|
++ led_net_yellow {
|
|
|
++ label = "net_yellow";
|
|
|
++ gpios = <&pio 12 GPIO_ACTIVE_LOW>;
|
|
|
++ default-state = "off";
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ gpio-keys {
|
|
|
++ compatible = "gpio-keys";
|
|
|
++ reset {
|
|
|
++ label = "reset";
|
|
|
++ linux,code = <KEY_RESTART>;
|
|
|
++ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
|
|
++ };
|
|
|
++
|
|
|
++ mesh {
|
|
|
++ label = "mesh";
|
|
|
++ linux,code = <BTN_9>;
|
|
|
++ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ gsw: gsw@0 {
|
|
|
++ compatible = "mediatek,mt753x";
|
|
|
++ mediatek,ethsys = <ðsys>;
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <0>;
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&uart0 {
|
|
|
++ status = "okay";
|
|
|
++};
|
|
|
++
|
|
|
++&watchdog {
|
|
|
++ status = "okay";
|
|
|
++};
|
|
|
++
|
|
|
++ð {
|
|
|
++ status = "okay";
|
|
|
++
|
|
|
++ gmac0: mac@0 {
|
|
|
++ compatible = "mediatek,eth-mac";
|
|
|
++ reg = <0>;
|
|
|
++ phy-mode = "2500base-x";
|
|
|
++
|
|
|
++ fixed-link {
|
|
|
++ speed = <2500>;
|
|
|
++ full-duplex;
|
|
|
++ pause;
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ gmac1: mac@1 {
|
|
|
++ compatible = "mediatek,eth-mac";
|
|
|
++ reg = <1>;
|
|
|
++ phy-mode = "2500base-x";
|
|
|
++
|
|
|
++ fixed-link {
|
|
|
++ speed = <2500>;
|
|
|
++ full-duplex;
|
|
|
++ pause;
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ mdio: mdio-bus {
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <0>;
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&gsw {
|
|
|
++ mediatek,mdio = <&mdio>;
|
|
|
++ mediatek,mdio_master_pinmux = <0>;
|
|
|
++ reset-gpios = <&pio 39 0>;
|
|
|
++ interrupt-parent = <&pio>;
|
|
|
++ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
++ status = "okay";
|
|
|
++
|
|
|
++ port5: port@5 {
|
|
|
++ compatible = "mediatek,mt753x-port";
|
|
|
++ reg = <5>;
|
|
|
++ phy-mode = "sgmii";
|
|
|
++
|
|
|
++ fixed-link {
|
|
|
++ speed = <2500>;
|
|
|
++ full-duplex;
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ port6: port@6 {
|
|
|
++ compatible = "mediatek,mt753x-port";
|
|
|
++ mediatek,ssc-on;
|
|
|
++ reg = <6>;
|
|
|
++ phy-mode = "sgmii";
|
|
|
++
|
|
|
++ fixed-link {
|
|
|
++ speed = <2500>;
|
|
|
++ full-duplex;
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&hnat {
|
|
|
++ mtketh-wan = "eth1";
|
|
|
++ mtketh-lan = "eth0";
|
|
|
++ mtketh-max-gmac = <2>;
|
|
|
++ status = "okay";
|
|
|
++};
|
|
|
++
|
|
|
++&spi0 {
|
|
|
++ pinctrl-names = "default";
|
|
|
++ pinctrl-0 = <&spi0_flash_pins>;
|
|
|
++ status = "okay";
|
|
|
++
|
|
|
++ spi_nand: spi_nand@0 {
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <1>;
|
|
|
++ compatible = "spi-nand";
|
|
|
++ reg = <0>;
|
|
|
++ spi-max-frequency = <52000000>;
|
|
|
++ spi-tx-buswidth = <4>;
|
|
|
++ spi-rx-buswidth = <4>;
|
|
|
++ spi-cal-enable;
|
|
|
++ spi-cal-mode = "read-data";
|
|
|
++ spi-cal-datalen = <7>;
|
|
|
++ spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; /* 'SPINAND' */
|
|
|
++ spi-cal-addrlen = <5>;
|
|
|
++ spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&pio {
|
|
|
++ pwm0_pin: pwm0-pin-g0 {
|
|
|
++ mux {
|
|
|
++ function = "pwm";
|
|
|
++ groups = "pwm0_0";
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ pwm1_pin: pwm1-pin-g0 {
|
|
|
++ mux {
|
|
|
++ function = "pwm";
|
|
|
++ groups = "pwm1_0";
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ pwm2_pin: pwm2-pin {
|
|
|
++ mux {
|
|
|
++ function = "pwm";
|
|
|
++ groups = "pwm2";
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ spi0_flash_pins: spi0-pins {
|
|
|
++ mux {
|
|
|
++ function = "spi";
|
|
|
++ groups = "spi0", "spi0_wp_hold";
|
|
|
++ };
|
|
|
++
|
|
|
++ conf-pu {
|
|
|
++ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
|
|
++ drive-strength = <MTK_DRIVE_8mA>;
|
|
|
++ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
|
|
++ };
|
|
|
++
|
|
|
++ conf-pd {
|
|
|
++ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
|
|
++ drive-strength = <MTK_DRIVE_8mA>;
|
|
|
++ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ uart1_pins: uart1-pins-g1 {
|
|
|
++ mux {
|
|
|
++ function = "uart";
|
|
|
++ groups = "uart1_1";
|
|
|
++ };
|
|
|
++ };
|
|
|
++
|
|
|
++ uart2_pins: uart2-pins-g1 {
|
|
|
++ mux {
|
|
|
++ function = "uart";
|
|
|
++ groups = "uart2_1";
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
+diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u.dts
|
|
|
+new file mode 100644
|
|
|
+index 00000000000..78271f10aea
|
|
|
+--- /dev/null
|
|
|
++++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-xiaomi-wr30u.dts
|
|
|
+@@ -0,0 +1,79 @@
|
|
|
++/dts-v1/;
|
|
|
++#include "mt7981-xiaomi-wr30u-base.dtsi"
|
|
|
++
|
|
|
++/ {
|
|
|
++ nmbm_spim_nand {
|
|
|
++ compatible = "generic,nmbm";
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <1>;
|
|
|
++
|
|
|
++ lower-mtd-device = <&spi_nand>;
|
|
|
++ forced-create;
|
|
|
++
|
|
|
++ partitions {
|
|
|
++ compatible = "fixed-partitions";
|
|
|
++ #address-cells = <0x01>;
|
|
|
++ #size-cells = <0x01>;
|
|
|
++
|
|
|
++ partition@0 {
|
|
|
++ label = "BL2";
|
|
|
++ reg = <0x00 0x100000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@100000 {
|
|
|
++ label = "Nvram";
|
|
|
++ reg = <0x100000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@140000 {
|
|
|
++ label = "Bdata";
|
|
|
++ reg = <0x140000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@180000 {
|
|
|
++ label = "Factory";
|
|
|
++ reg = <0x180000 0x200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@380000 {
|
|
|
++ label = "FIP";
|
|
|
++ reg = <0x380000 0x200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@580000 {
|
|
|
++ label = "crash";
|
|
|
++ reg = <0x580000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@5c0000 {
|
|
|
++ label = "crash_log";
|
|
|
++ reg = <0x5c0000 0x40000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@600000 {
|
|
|
++ label = "ubi";
|
|
|
++ reg = <0x600000 0x2200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@2800000 {
|
|
|
++ label = "ubi1";
|
|
|
++ reg = <0x2800000 0x2200000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@4a00000 {
|
|
|
++ label = "overlay";
|
|
|
++ reg = <0x4a00000 0x2000000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@6a00000 {
|
|
|
++ label = "data";
|
|
|
++ reg = <0x6a00000 0xc00000>;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@7600000 {
|
|
|
++ label = "KF";
|
|
|
++ reg = <0x7600000 0x40000>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
+diff --git a/target/linux/mediatek/image/mt7981.mk b/target/linux/mediatek/image/mt7981.mk
|
|
|
+index af070ebc017..86c05aec8c6 100644
|
|
|
+--- a/target/linux/mediatek/image/mt7981.mk
|
|
|
++++ b/target/linux/mediatek/image/mt7981.mk
|
|
|
+@@ -255,3 +255,37 @@ define Device/glinet_gl-mt2500
|
|
|
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
|
+ endef
|
|
|
+ TARGET_DEVICES += glinet_gl-mt2500
|
|
|
++
|
|
|
++define Device/xiaomi_wr30u
|
|
|
++ DEVICE_VENDOR := Xiaomi
|
|
|
++ DEVICE_MODEL := WR30U
|
|
|
++ DEVICE_DTS := mt7981-xiaomi-wr30u
|
|
|
++ DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
|
|
++ SUPPORTED_DEVICES := xiaomi,wr30u
|
|
|
++ UBINIZE_OPTS := -E 5
|
|
|
++ BLOCKSIZE := 128k
|
|
|
++ PAGESIZE := 2048
|
|
|
++ IMAGE_SIZE := 34816k
|
|
|
++ KERNEL_IN_UBI := 1
|
|
|
++ IMAGES += factory.bin
|
|
|
++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
|
|
++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
|
++endef
|
|
|
++TARGET_DEVICES += xiaomi_wr30u
|
|
|
++
|
|
|
++define Device/xiaomi_wr30u-112M
|
|
|
++ DEVICE_VENDOR := Xiaomi
|
|
|
++ DEVICE_MODEL := WR30U (with 112M ubi)
|
|
|
++ DEVICE_DTS := mt7981-xiaomi-wr30u-112M
|
|
|
++ DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
|
|
++ SUPPORTED_DEVICES := xiaomi,wr30u
|
|
|
++ UBINIZE_OPTS := -E 5
|
|
|
++ BLOCKSIZE := 128k
|
|
|
++ PAGESIZE := 2048
|
|
|
++ IMAGE_SIZE := 114688k
|
|
|
++ KERNEL_IN_UBI := 1
|
|
|
++ IMAGES += factory.bin
|
|
|
++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
|
|
++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
|
++endef
|
|
|
++TARGET_DEVICES += xiaomi_wr30u-112M
|
|
|
+diff --git a/target/linux/mediatek/mt7981/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7981/base-files/etc/board.d/01_leds
|
|
|
+index e2bc027cbc6..7190778e545 100755
|
|
|
+--- a/target/linux/mediatek/mt7981/base-files/etc/board.d/01_leds
|
|
|
++++ b/target/linux/mediatek/mt7981/base-files/etc/board.d/01_leds
|
|
|
+@@ -12,6 +12,11 @@ case "$(board_name)" in
|
|
|
+ ucidef_set_led_default "green" "GREEN" "360t7:green" "1"
|
|
|
+ ucidef_set_led_default "red" "RED" "360t7:red" "0"
|
|
|
+ ;;
|
|
|
++*wr30u*)
|
|
|
++ ucidef_set_led_default "sys_blue" "BLUE" "led_blue" "1"
|
|
|
++ ucidef_set_led_default "sys_yellow" "YELLOW" "led_yellow" "0"
|
|
|
++ ucidef_set_led_netdev "net_blue" "NET_BLUE" "net_blue" "eth1"
|
|
|
++ ;;
|
|
|
+ esac
|
|
|
+ board_config_flush
|
|
|
+
|
|
|
+diff --git a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
|
|
+index a27b30b1183..f3b5c848963 100755
|
|
|
+--- a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
|
|
++++ b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
|
|
+@@ -33,6 +33,11 @@ mediatek_setup_interfaces()
|
|
|
+ *mt2500*)
|
|
|
+ ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
|
+ ;;
|
|
|
++ *wr30u*)
|
|
|
++ ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
++ ucidef_add_switch "switch0" \
|
|
|
++ "1:lan" "2:lan" "3:lan" "0:wan" "6u@eth0" "5u@eth1"
|
|
|
++ ;;
|
|
|
+ *)
|
|
|
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
|
|
|
+ ;;
|
|
|
+@@ -86,6 +91,10 @@ mediatek_setup_macs()
|
|
|
+ wan_mac=$(mtd_get_mac_binary $part_name $wan_mac_offset)
|
|
|
+
|
|
|
+ case $board in
|
|
|
++ *wr30u*)
|
|
|
++ wan_mac=$(dd if=/dev/mtd3ro bs=1 count=256 2>/dev/null |grep "^ethaddr_wan=" | awk -F '=' '{print $2}')
|
|
|
++ lan_mac=$(dd if=/dev/mtd3ro bs=1 count=256 2>/dev/null |grep "^ethaddr=" | awk -F '=' '{print $2}')
|
|
|
++ ;;
|
|
|
+ *mt3000*)
|
|
|
+ wan_mac=$(mtd_get_mac_binary $part_name 0x0a)
|
|
|
+ lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
|
+diff --git a/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh
|
|
|
+index 2babdc0b75a..b34d0f9e000 100644
|
|
|
+--- a/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh
|
|
|
++++ b/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh
|
|
|
+@@ -4,6 +4,7 @@ platform_do_upgrade() {
|
|
|
+ local board=$(board_name)
|
|
|
+
|
|
|
+ case "$board" in
|
|
|
++ *wr30u* |\
|
|
|
+ *mt3000* |\
|
|
|
+ *x3000* |\
|
|
|
+ *xe3000* |\
|
|
|
+@@ -30,6 +31,7 @@ platform_check_image() {
|
|
|
+ [ "$#" -gt 1 ] && return 1
|
|
|
+
|
|
|
+ case "$board" in
|
|
|
++ *wr30u* |\
|
|
|
+ *mt3000* |\
|
|
|
+ *x3000* |\
|
|
|
+ *xe3000* |\
|