Revert "mediatek: drop redmi-ax6000 variant with modified env"

Let's keep this for a bit more time, our custom u-boot still uses
this partition layout.

This reverts commit d29dbf052a.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-01-02 10:37:32 +08:00
parent 01860bfdcc
commit d361157ea8
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 61 additions and 0 deletions

View File

@ -34,6 +34,7 @@ bananapi,bpi-r3)
;;
esac
;;
xiaomi,redmi-router-ax6000|\
xiaomi,redmi-router-ax6000-stock)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"

View File

@ -0,0 +1,42 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/dts-v1/;
#include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
/ {
model = "Xiaomi Redmi Router AX6000";
compatible = "xiaomi,redmi-router-ax6000", "mediatek,mt7986a";
};
&spi_nand_flash {
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
};
&partitions {
partition@580000 {
label = "crash";
reg = <0x580000 0x40000>;
read-only;
};
partition@5c0000 {
label = "crash_log";
reg = <0x5c0000 0x40000>;
read-only;
};
/* ubi partition is the result of squashing
* consecutive stock partitions:
* - ubi
* - ubi1
* - overlay
*/
partition@600000 {
label = "ubi";
reg = <0x600000 0x6e00000>;
};
/* last 12 MiB is reserved for NMBM bad block table */
};

View File

@ -6,6 +6,7 @@ board=$(board_name)
board_config_update
case $board in
xiaomi,redmi-router-ax6000|\
xiaomi,redmi-router-ax6000-stock|\
xiaomi,redmi-router-ax6000-ubootmod)
ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan"

View File

@ -16,6 +16,7 @@ mediatek_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
ucidef_set_interface_macaddr "wan" "$(macaddr_add $(cat /sys/class/net/eth0/address) 1)"
;;
xiaomi,redmi-router-ax6000|\
xiaomi,redmi-router-ax6000-stock|\
xiaomi,redmi-router-ax6000-ubootmod)
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
@ -34,6 +35,7 @@ mediatek_setup_macs()
local label_mac=""
case $board in
xiaomi,redmi-router-ax6000|\
xiaomi,redmi-router-ax6000-stock|\
xiaomi,redmi-router-ax6000-ubootmod)
wan_mac=$(mtd_get_mac_ascii Bdata ethaddr_wan)

View File

@ -125,6 +125,21 @@ define Device/mediatek_mt7986b-rfb
endef
TARGET_DEVICES += mediatek_mt7986b-rfb
define Device/xiaomi_redmi-router-ax6000
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Redmi Router AX6000
DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-leds-ws2812b
KERNEL_LOADADDR := 0x48000000
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_IN_UBI := 1
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += xiaomi_redmi-router-ax6000
define Device/xiaomi_redmi-router-ax6000-stock
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Redmi Router AX6000 (stock layout)