Skip to content

Commit fd8ffb0

Browse files
committed
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](openwrt#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: ```bash ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5 ``` 4. Perform sysupgrade. Tested-by: 4pda users Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
1 parent 52fa372 commit fd8ffb0

11 files changed

Lines changed: 594 additions & 5 deletions

File tree

package/boot/arm-trusted-firmware-mediatek/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ define Trusted-Firmware-A/mt7981-spim-nand-ubi-ddr4
262262
USE_UBI:=1
263263
endef
264264

265-
define Trusted-Firmware-A/mt7981-cudy-tr3000-v1
266-
NAME:=Cudy TR3000 v1 (SPI-NAND via SPIM, DDR3)
265+
define Trusted-Firmware-A/mt7981-cudy-ddr3
266+
NAME:=Cudy (SPI-NAND via SPIM, DDR3)
267267
BOOT_DEVICE:=spim-nand
268268
BUILD_SUBTARGET:=filogic
269269
PLAT:=mt7981
@@ -664,7 +664,7 @@ TFA_TARGETS:= \
664664
mt7981-emmc-ddr4 \
665665
mt7981-sdmmc-ddr4 \
666666
mt7981-spim-nand-ddr4 \
667-
mt7981-cudy-tr3000-v1 \
667+
mt7981-cudy-ddr3 \
668668
mt7986-ram-ddr3 \
669669
mt7986-emmc-ddr3 \
670670
mt7986-nor-ddr3 \

package/boot/uboot-mediatek/Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,18 @@ define U-Boot/mt7981_cudy_tr3000-v1
311311
UBOOT_IMAGE:=u-boot.fip
312312
BL2_BOOTDEV:=cudy-tr3000-v1
313313
BL2_SOC:=mt7981
314-
DEPENDS:=+trusted-firmware-a-mt7981-cudy-tr3000-v1
314+
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
315+
endef
316+
317+
define U-Boot/mt7981_cudy_wbr3000uax-v1
318+
NAME:=Cudy WBR3000UAX v1
319+
BUILD_SUBTARGET:=filogic
320+
BUILD_DEVICES:=cudy_wbr3000uax-v1-ubootmod
321+
UBOOT_CONFIG:=mt7981_cudy_wbr3000uax-v1
322+
UBOOT_IMAGE:=u-boot.fip
323+
BL2_BOOTDEV:=cudy-wbr3000uax-v1
324+
BL2_SOC:=mt7981
325+
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
315326
endef
316327

317328
define U-Boot/mt7981_glinet_gl-mt2500
@@ -1091,6 +1102,7 @@ UBOOT_TARGETS := \
10911102
mt7981_cmcc_rax3000m-nand-ddr4 \
10921103
mt7981_comfast_cf-wr632ax \
10931104
mt7981_cudy_tr3000-v1 \
1105+
mt7981_cudy_wbr3000uax-v1 \
10941106
mt7981_gatonetworks_gdsp \
10951107
mt7981_glinet_gl-mt2500 \
10961108
mt7981_glinet_gl-x3000 \

0 commit comments

Comments
 (0)