aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts16
-rw-r--r--target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts34
-rw-r--r--target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi29
-rw-r--r--target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi245
-rw-r--r--target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi255
-rw-r--r--target/linux/mediatek/filogic/base-files/etc/board.d/01_leds2
-rw-r--r--target/linux/mediatek/filogic/base-files/etc/board.d/02_network4
-rwxr-xr-xtarget/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh4
-rw-r--r--target/linux/mediatek/image/filogic.mk45
9 files changed, 391 insertions, 243 deletions
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts
new file mode 100644
index 00000000000..809e625ce1e
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-ax3000t.dtsi"
+
+/ {
+ model = "Xiaomi Mi Router AX3000T (OpenWrt U-Boot layout)";
+ compatible = "xiaomi,mi-router-ax3000t-ubootmod", "mediatek,mt7981";
+};
+
+&partitions {
+ partition@600000 {
+ label = "ubi";
+ reg = <0x600000 0x7000000>;
+ };
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts
new file mode 100644
index 00000000000..cc0d44fdf5d
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-ax3000t.dtsi"
+
+/ {
+ model = "Xiaomi Mi Router AX3000T";
+ compatible = "xiaomi,mi-router-ax3000t", "mediatek,mt7981";
+};
+
+&spi_nand {
+ mediatek,nmbm;
+ mediatek,bmt-max-ratio = <1>;
+ mediatek,bmt-max-reserved-blocks = <64>;
+};
+
+&partitions {
+ // ubi_kernel is the ubi partition in stock.
+ partition@600000 {
+ label = "ubi_kernel";
+ reg = <0x600000 0x2200000>;
+ };
+
+ /* ubi is the result of squashing
+ * consecutive stock partitions:
+ * - ubi1
+ * - overlay
+ * - data
+ */
+ partition@2800000 {
+ label = "ubi";
+ reg = <0x2800000 0x4e00000>;
+ };
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi
new file mode 100644
index 00000000000..7b6fde8465c
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-common.dtsi"
+
+&gmac0 {
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_factory_4 (-2)>;
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ status = "okay";
+
+ nfc@57 {
+ compatible = "nt082c";
+ reg = <0x57>;
+ };
+};
+
+&pio {
+ i2c_pins: i2c-pins {
+ mux {
+ function = "i2c";
+ groups = "i2c0_1";
+ };
+ };
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
new file mode 100644
index 00000000000..d6872395a90
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
@@ -0,0 +1,245 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+#include "mt7981.dtsi"
+
+/ {
+ aliases {
+ serial0 = &uart0;
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_yellow;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_yellow;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory {
+ reg = <0 0x40000000 0 0x10000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-mesh {
+ label = "mesh";
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_9>;
+ linux,input-type = <EV_SW>;
+ };
+
+ button-reset {
+ label = "reset";
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ led_status_blue: led-status-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: led-status-yellow {
+ color = <LED_COLOR_ID_YELLOW>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ phy-mode = "2500base-x";
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ pause;
+ };
+ };
+};
+
+&mdio_bus {
+ switch: switch@1f {
+ compatible = "mediatek,mt7531";
+ reg = <31>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&pio>;
+ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+ };
+};
+
+&switch {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "wan";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "lan2";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan3";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan4";
+ };
+
+ port@6 {
+ reg = <6>;
+ ethernet = <&gmac0>;
+ phy-mode = "2500base-x";
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ pause;
+ };
+ };
+ };
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_flash_pins>;
+ status = "okay";
+
+ spi_nand: flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "spi-nand";
+ reg = <0>;
+
+ spi-max-frequency = <52000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "BL2";
+ reg = <0x00 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "Nvram";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "Bdata";
+ reg = <0x140000 0x40000>;
+ };
+
+ factory: partition@180000 {
+ label = "Factory";
+ reg = <0x180000 0x200000>;
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x1000>;
+ };
+
+ macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ partition@380000 {
+ label = "FIP";
+ reg = <0x380000 0x200000>;
+ read-only;
+ };
+
+ partition@580000 {
+ label = "crash";
+ reg = <0x580000 0x40000>;
+ read-only;
+ };
+
+ partition@5c0000 {
+ label = "crash_log";
+ reg = <0x5c0000 0x40000>;
+ read-only;
+ };
+
+ partition@7600000 {
+ label = "KF";
+ reg = <0x7600000 0x40000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pio {
+ 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>;
+ };
+ };
+};
+
+&wifi {
+ status = "okay";
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&watchdog {
+ status = "okay";
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
index 1e738a4474d..87a2493a238 100644
--- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
@@ -1,252 +1,23 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
+#include "mt7981b-xiaomi-mi-router-common.dtsi"
-#include "mt7981.dtsi"
-
-/ {
- aliases {
- serial0 = &uart0;
- led-boot = &led_system_yellow;
- led-failsafe = &led_system_yellow;
- led-running = &led_system_blue;
- led-upgrade = &led_system_yellow;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- memory {
- reg = <0 0x40000000 0 0x10000000>;
- };
-
- gpio-keys {
- compatible = "gpio-keys";
-
- reset {
- label = "reset";
- gpios = <&pio 1 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
-
- mesh {
- label = "mesh";
- gpios = <&pio 0 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_9>;
- linux,input-type = <EV_SW>;
- };
- };
-
- leds {
- compatible = "gpio-leds";
-
- led_system_blue: system_blue {
- label = "blue:system";
- gpios = <&pio 9 GPIO_ACTIVE_LOW>;
- };
-
- led_system_yellow: system_yellow {
- label = "yellow:system";
- gpios = <&pio 10 GPIO_ACTIVE_LOW>;
- };
-
- led_network_blue {
- label = "blue:network";
- gpios = <&pio 11 GPIO_ACTIVE_LOW>;
- };
-
- led_network_yellow {
- label = "yellow:network";
- gpios = <&pio 12 GPIO_ACTIVE_LOW>;
- };
- };
-};
-
-&eth {
- status = "okay";
-
- gmac0: mac@0 {
- compatible = "mediatek,eth-mac";
- reg = <0>;
- phy-mode = "2500base-x";
-
- nvmem-cells = <&macaddr_factory_4 (-1)>;
- nvmem-cell-names = "mac-address";
-
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
+&gmac0 {
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_factory_4 (-1)>;
};
-&mdio_bus {
- switch: switch@1f {
- compatible = "mediatek,mt7531";
- reg = <31>;
- reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
- interrupt-controller;
- #interrupt-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+&leds {
+ led-wan-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
+ gpios = <&pio 11 GPIO_ACTIVE_LOW>;
};
-};
-
-&switch {
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- label = "wan";
- };
-
- port@1 {
- reg = <1>;
- label = "lan2";
- };
-
- port@2 {
- reg = <2>;
- label = "lan3";
- };
-
- port@3 {
- reg = <3>;
- label = "lan4";
- };
-
- port@6 {
- reg = <6>;
- ethernet = <&gmac0>;
- phy-mode = "2500base-x";
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
+ led-wan-yellow {
+ color = <LED_COLOR_ID_YELLOW>;
+ function = LED_FUNCTION_WAN;
+ gpios = <&pio 12 GPIO_ACTIVE_LOW>;
};
};
-
-&spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_flash_pins>;
- status = "okay";
-
- spi_nand: flash@0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "spi-nand";
- reg = <0>;
-
- spi-max-frequency = <52000000>;
- spi-tx-bus-width = <4>;
- spi-rx-bus-width = <4>;
-
- partitions: partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "BL2";
- reg = <0x00 0x100000>;
- read-only;
- };
-
- partition@100000 {
- label = "Nvram";
- reg = <0x100000 0x40000>;
- };
-
- partition@140000 {
- label = "Bdata";
- reg = <0x140000 0x40000>;
- };
-
- factory: partition@180000 {
- label = "Factory";
- reg = <0x180000 0x200000>;
- read-only;
-
- nvmem-layout {
- compatible = "fixed-layout";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_4: macaddr@4 {
- compatible = "mac-base";
- reg = <0x4 0x6>;
- #nvmem-cell-cells = <1>;
- };
- };
- };
-
- partition@380000 {
- label = "FIP";
- reg = <0x380000 0x200000>;
- read-only;
- };
-
- partition@580000 {
- label = "crash";
- reg = <0x580000 0x40000>;
- read-only;
- };
-
- partition@5c0000 {
- label = "crash_log";
- reg = <0x5c0000 0x40000>;
- read-only;
- };
-
- partition@7600000 {
- label = "KF";
- reg = <0x7600000 0x40000>;
- read-only;
- };
- };
- };
-};
-
-&pio {
- 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>;
- };
- };
-};
-
-&wifi {
- status = "okay";
-
- mediatek,mtd-eeprom = <&factory 0x0>;
-};
-
-&uart0 {
- status = "okay";
-};
-
-&watchdog {
- status = "okay";
-};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index b7865586183..51654ae87f3 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -36,7 +36,7 @@ routerich,ax3000)
xiaomi,mi-router-wr30u-112m-nmbm|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,mi-router-wr30u-ubootmod)
- ucidef_set_led_netdev "wan" "wan" "blue:network" "wan"
+ ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx"
;;
xiaomi,redmi-router-ax6000-stock|\
xiaomi,redmi-router-ax6000-ubootmod)
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index a36d998a406..dd3464b72cc 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -72,6 +72,8 @@ mediatek_setup_interfaces()
tplink,tl-xdr6086)
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
;;
+ xiaomi,mi-router-ax3000t|\
+ xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-112m-nmbm|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,mi-router-wr30u-ubootmod|\
@@ -158,6 +160,8 @@ mediatek_setup_macs()
wan_mac=$label_mac
lan_mac=$(macaddr_add "$label_mac" 1)
;;
+ xiaomi,mi-router-ax3000t|\
+ xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-112m-nmbm|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,mi-router-wr30u-ubootmod|\
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 9600f8745fe..65ec5d8271e 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -49,6 +49,7 @@ xiaomi_initial_setup()
local board=$(board_name)
case "$board" in
+ xiaomi,mi-router-ax3000t|\
xiaomi,mi-router-wr30u-stock)
fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)"
;;
@@ -126,6 +127,7 @@ platform_do_upgrade() {
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
tplink,tl-xdr6088|\
+ xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-ubootmod|\
xiaomi,redmi-router-ax6000-ubootmod)
CI_KERNPART="fit"
@@ -140,6 +142,7 @@ platform_do_upgrade() {
EMMC_ROOT_DEV="$(cmdline_get_var root)"
emmc_do_upgrade "$1"
;;
+ xiaomi,mi-router-ax3000t|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,redmi-router-ax6000-stock)
CI_KERN_UBIPART=ubi_kernel
@@ -211,6 +214,7 @@ platform_pre_upgrade() {
asus,tuf-ax6000)
asus_initial_setup
;;
+ xiaomi,mi-router-ax3000t|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,redmi-router-ax6000-stock)
xiaomi_initial_setup
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 15951df1ec2..c079fae0b00 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -728,6 +728,51 @@ define Device/ubnt_unifi-6-plus
endef
TARGET_DEVICES += ubnt_unifi-6-plus
+define Device/xiaomi_mi-router-ax3000t
+ DEVICE_VENDOR := Xiaomi
+ DEVICE_MODEL := Mi Router AX3000T
+ DEVICE_DTS := mt7981b-xiaomi-mi-router-ax3000t
+ DEVICE_DTS_DIR := ../dts
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS := initramfs-factory.ubi
+ ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel
+endif
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += xiaomi_mi-router-ax3000t
+
+define Device/xiaomi_mi-router-ax3000t-ubootmod
+ DEVICE_VENDOR := Xiaomi
+ DEVICE_MODEL := Mi Router AX3000T (OpenWrt U-Boot layout)
+ DEVICE_DTS := mt7981b-xiaomi-mi-router-ax3000t-ubootmod
+ DEVICE_DTS_DIR := ../dts
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
+ KERNEL_IN_UBI := 1
+ UBOOTENV_IN_UBI := 1
+ IMAGES := sysupgrade.itb
+ KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+ KERNEL := kernel-bin | gzip
+ KERNEL_INITRAMFS := kernel-bin | lzma | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+ IMAGE/sysupgrade.itb := append-kernel | \
+ fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
+ ARTIFACTS := preloader.bin bl31-uboot.fip
+ ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3
+ ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot xiaomi_mi-router-ax3000t
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS += initramfs-factory.ubi
+ ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
+endif
+endef
+TARGET_DEVICES += xiaomi_mi-router-ax3000t-ubootmod
+
define Device/xiaomi_mi-router-wr30u-112m-nmbm
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router WR30U (112M UBI with NMBM-Enabled layout)