This allows us to use the full size of nand, which increases ubi size from 90M to 122.25M. Flashing instructions: 1. Login into the device and backup all your partitions, especially `Factory` and 'HW' to be able to come back to stock and use all Wavlink services. 2. Unlock mtd partitions: ``` apk update && apk add kmod-mtd-rw insmod mtd-rw i_want_a_brick=1 ``` 3. Upload new `bl2` and `fip` to the router /tmp and write them: ``` mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-preloader.bin bl2 mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-bl31-uboot.fip fip mtd erase ubi ``` 4. Set static IP on your PC: IP 192.168.1.254/24, GW 192.168.1.1 5. Serve OpenWrt initramfs image using TFTP server. 6. Cut off the power and re-engage, wait for TFTP recovery to complete. 7. After OpenWrt initramfs has booted, prepare ubi and envs: ``` ubidetach -p /dev/mtd4 && ubiformat /dev/mtd4 -y && ubiattach -p /dev/mtd4 && ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB && ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB ``` 8. Perform sysupgrade. Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22753 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
78 lines
1.3 KiB
Plaintext
78 lines
1.3 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-only OR MIT
|
|
|
|
/dts-v1/;
|
|
|
|
#include "mt7981b-wavlink-wl-wnt100x3.dtsi"
|
|
|
|
/ {
|
|
model = "WAVLINK WL-WNT100X3 (OpenWrt U-Boot layout)";
|
|
compatible = "wavlink,wl-wnt100x3-ubootmod", "mediatek,mt7981b";
|
|
};
|
|
|
|
&chosen {
|
|
bootargs = "root=/dev/fit0 rootwait";
|
|
rootdisk = <&ubi_rootdisk>;
|
|
};
|
|
|
|
&spi_nand {
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "bl2";
|
|
reg = <0x0 0x100000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@100000 {
|
|
label = "u-boot-env";
|
|
reg = <0x100000 0x80000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@180000 {
|
|
label = "factory";
|
|
reg = <0x180000 0x200000>;
|
|
read-only;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
eeprom_factory: eeprom@0 {
|
|
reg = <0x0 0x1000>;
|
|
};
|
|
|
|
macaddr_lan: macaddr@3fff4 {
|
|
reg = <0x3fff4 0x06>;
|
|
};
|
|
|
|
macaddr_wan: macaddr@3fffa {
|
|
reg = <0x3fffa 0x06>;
|
|
};
|
|
};
|
|
};
|
|
|
|
partition@380000 {
|
|
label = "fip";
|
|
reg = <0x380000 0x200000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@580000 {
|
|
label = "ubi";
|
|
reg = <0x580000 0x7a80000>;
|
|
compatible = "linux,ubi";
|
|
|
|
volumes {
|
|
ubi_rootdisk: ubi-volume-fit {
|
|
volname = "fit";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|