]> git.ipfire.org Git - thirdparty/openwrt.git/commit
mediatek: add ubootmod layout for Cudy WBR3000UAX v1 21225/head
authorFil Dunsky <filipp.dunsky@gmail.com>
Fri, 12 Dec 2025 15:51:39 +0000 (18:51 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 30 Dec 2025 21:20:33 +0000 (22:20 +0100)
commit15df98f3b54d9ce0d3a7c7b238e1c7b4814a15d6
treeac533d91e8051bd83a22970eabfebbbda741d891
parentd7d6faf26f39b59d22c38d09321e0d345fbec950
mediatek: add ubootmod layout for Cudy WBR3000UAX v1

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

If you are at factory firmware, please refer
to [PR](https://github.com/openwrt/openwrt/pull/21141)
to boot into OpenWrt first.

1. Log in to the device and backup all the partitions,
especially unique `Factory` and `bdata` partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing:
```bash
apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1
```
3. Write new OpenWrt (U-Boot Layout) `BL2` and `FIP`:
```bash
mtd write openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-preloader.bin BL2
mtd write openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-bl31-uboot.fip FIP
```
4. Set static IP on your PC: `192.168.1.254`, gateway `192.168.1.1`
5. Serve openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean `/dev/mtd5` ubi partition to utilize maximum of free space & create ubootenvs:
```bash
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
```
4. Perform sysupgrade.

Tested-by: 4pda users
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21225
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-mediatek/Makefile
package/boot/uboot-mediatek/patches/449-add-cudy_wbr3000uax-v1.patch [new file with mode: 0644]
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1-ubootmod.dts [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/image/filogic.mk