Hi community,
I have this router:
Dual-Band Wireless AX6000 2.5G Ethernet IAD/Gateway - EX5601/EX5600-T Series | Global | Zyxel
I'm able to compile and flash the firmware from zyxel source files but I'd like to have a clean Owrt build.
I've been building the openwrt image from the openwrt git repo but I'm not able to flash because I think it's expecting a different partition table.
Too the bootloader seems locked because even if i change the bootdelay envs I can't stop it to boot the zyxel loader (zloader ZHAL).
Bootloader log:
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [1000]
T0: 0000 0228 [010F]
Jump to BL
NOTICE: BL2: v2.6(release):1b03fb11
NOTICE: BL2: Built : 10:18:01, Jul 21 2022
NOTICE: WDT: disabled
NOTICE: CPU: MT7986 (2000MHz)
NOTICE: EMI: Using DDR4 settings
NOTICE: EMI: Detected DRAM size: 1024MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: SPI_NAND parses attributes from parameter page.
NOTICE: SPI_NAND Detected ID 0x2c
NOTICE: Page size 4096, Block size 262144, size 536870912
NOTICE: Initializing NMBM ...
NOTICE: Signature found at block 2047 [0x1ffc0000]
NOTICE: First info table with writecount 0 found in block 1920
NOTICE: Second info table with writecount 0 found in block 1923
NOTICE: NMBM has been successfully attached in read-only mode
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.6(release):1b03fb11
NOTICE: BL31: Built : 10:18:06, Jul 21 2022
U-Boot 2022.01-rc4 (Jul 21 2022 - 10:16:56 +0000)
CPU: MediaTek MT7986
Model: ZYXEL EX5601-T0
DRAM: 1 GiB
Initializing NMBM ...
spi-nand: spi_nand spi_nand@1: Micron SPI NAND was found.
spi-nand: spi_nand spi_nand@1: 512 MiB, block size: 256 KiB, page size: 4096, OOB size: 256
Could not find a valid device for nmbm0
Signature found at block 2047 [0x1ffc0000]
First info table with writecount 0 found in block 1920
Second info table with writecount 0 found in block 1923
NMBM has been successfully attached
MMC: mmc@11230000: 0
Loading Environment from MTD... OK
In: serial@11002000
Out: serial@11002000
Err: serial@11002000
Net: eth0: ethernet@15100000
Reading 262144 byte(s) at offset 0x00000000
## Booting kernel from Legacy Image at 46000000 ...
Image Name: zld-2.3 07/21/2022 10:17:53
Image Type: AArch64 U-Boot Standalone Program (gzip compressed)
Data Size: 21708 Bytes = 21.2 KiB
Load Address: 41e00200
Entry Point: 41e003f4
Verifying Checksum ... OK
Uncompressing Standalone Program
ZYXEL zloader v2.3.9 (07/21/2022 - 10:17:53)
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: attached mtd7 (name "ubi", size 64 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 34/7, WL threshold: 4096, image sequence number: 1658393161
ubi0: available PEBs: 1, total reserved PEBs: 255, PEBs reserved for bad PEB handling: 38
Reading from volume 'zyfwinfo' to 0x7fb34760, size 0x100 ... OK
ubi0: detaching mtd7
ubi0: mtd7 is detached
zyfwinfo->seq_num : 70
ubi0: attaching mtd8
ubi0: scanning is finished
ubi0: attached mtd8 (name "ubi2", size 64 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 38/30, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 256, PEBs reserved for bad PEB handling: 38
Reading from volume 'zyfwinfo' to 0x7fb360d0, size 0x100 ... OK
ubi0: detaching mtd8
ubi0: mtd8 is detached
zyfwinfo->seq_num : 69
Current bootflag is 0
BOARD_DETECT_BY_GPIO=>result=0
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: attached mtd7 (name "ubi", size 64 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 34/7, WL threshold: 4096, image sequence number: 1658393161
ubi0: available PEBs: 1, total reserved PEBs: 255, PEBs reserved for bad PEB handling: 38
Reading from volume 'zyfwinfo' to 0x7fb47590, size 0x100 ... OK
ubi0: detaching mtd7
ubi0: mtd7 is detached
Multiboot clinent version: 2.7
Hit any key to stop autoboot: 5...4...3...2...1...0
I can't list this router on the ToH because registrations are closed but I think this is an easy addition given the already existing support for filogic830
I'd like to understand how much interest and efforts we can put into this. (maybe building a new unlocked u-boot bootloader from sources?)
[ 1.594029] Creating 8 MTD partitions on "nmbm_spim_nand":
[ 1.599500] 0x000000000000-0x000000100000 : "BL2"
[ 1.604609] 0x000000100000-0x000000180000 : "u-boot-env"
[ 1.610207] 0x000000180000-0x000000380000 : "Factory"
[ 1.615530] 0x000000380000-0x000000540000 : "FIP"
[ 1.620503] 0x000000540000-0x000000580000 : "zloader"
[ 1.625838] 0x000000580000-0x000004580000 : "ubi"
[ 1.630843] 0x000004580000-0x000008580000 : "ubi2"
[ 1.635956] 0x000008580000-0x00001e000000 : "zyubi"
fw_printenv
root@EX5601-T0:/tmp/var/home/root# fw_printenv
EngDebugFlag=1
FeatureBit=0
FeatureBits=040A0005ffffffff0000000000000000ffffffffffffffffffffffffa2f7
ProductName=EX5601-T0
SerialNumber=
VendorName=ZYXEL Communication Corp
WpaPskKey=
admin=
baudrate=115200
countryCode=0
d2key=
ethact=ethernet@15100000
ethaddr=10:71:b3:75:64:10
fdtcontroladdr=7ffc5c80
initrd_end=0
initrd_start=0
ipaddr=192.168.1.1
loadaddr=0x46000000
mtdids=nmbm0=nmbm0
mtdparts=nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),1792k(fip),256k(zloader),65536k(ubi),65536k(ubi2),354816k(zyubi)
netmask=255.255.255.0
nummacaddrs=11
serverip=192.168.1.99
sn81=
stderr=serial@11002000
stdin=serial@11002000
stdout=serial@11002000
supervisor=
zld_date=07/21/2022
zld_time=10:17:53
zld_ver=2.3
bootdelay=10
root@EX5601-T0:/tmp/var/home/root#
root@EX5601-T0:/tmp/var/home/root# cat /proc/mtd
dev: size erasesize name
mtd0: 20000000 00040000 "spi0.1"
mtd1: 00100000 00040000 "BL2"
mtd2: 00080000 00040000 "u-boot-env"
mtd3: 00200000 00040000 "Factory"
mtd4: 001c0000 00040000 "FIP"
mtd5: 00040000 00040000 "zloader"
mtd6: 04000000 00040000 "ubi"
mtd7: 04000000 00040000 "ubi2"
mtd8: 15a80000 00040000 "zyubi"
root@EX5601-T0:/tmp/var/home/root# cat /proc/cmdline
console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 rootubi=ubi
ZHAL:
ZHAL> ATHE
ATER x,y erase flash from offset x whith length y
ATRF x,y,z read data flash to ram(x=flash offset, y=len, z=ram address)
ATWF x,y,z write data from RAM to flash(x=flash offset, y=len, z=ram address)
ATDS x,y dump data of spare area in page y of block x
ATUR [y:]x upgrade RAS image (x=file name, y=host ip)
ATUB [y:]x upgrade ZLD image (x=file name, y=host ip)
ATUD [y:]x upgrade ROMD image (x=file name, y=host ip)
ATUM [y:]x upgrade ROMFILE image (x=file name, y=host ip)
ATCD erase RomD partition
ATCM erase ROMFILE partition
ATCR erase data partition
ATCMISC erase misc partition
ATCMP x,y,z compare two memory space x and y with length is z
ATDU x,y dump memory or registers(x=ram address, y=length)
ATWW x,y,z set memory or registers(x=address, y=value, z=len)
ATRT [x,y,z,u] ATRT RAM read/write test (x=level, y=start addr, z=end addr, u=iterations
ATCB copy from FLASH to working buffer
ATSB save working buffer to FLASH
ATWM x set MAC address in working buffer
ATWZ x,y,z,u,v set zyxel MAC address, Country code, EngDbgFlag, FeatureBit and MAC number to FLASH
ATSH dump manufacturer related data in ROM
ATCO x set country code in working buffer
ATSN x set serial number to FLASH
ATCK [x,y,z] show, write or reset psk, admin and supervisor key
ATBT x block0 write enable (1=enable, 0=disable)
ATEN x[,y] set BootExtension Debug Flag (y=password)
ATSE x show the seed of password generator
ATDC disable check model mechanism
ATSR [x] system reboot
ATGU go back to U-Boot command line mode
ATGO boot up whole system
ATLD x,[y] load file x to memory address y via TFTP
ATMB [x,y] upgrade firmware image by multiboot
ATSW swap boot image to another partition (must reboot to make it take effect)
ATLED [x,y] set LED (x=led no, y=blink mode(0(off)|1(on)|2(fast)|3(slow))
ATPIO x,y[,z] set GPIO (x={s|w|r}, y=pio num, z=write data)
ATD2 [x] show or write D2 key
ATHE show command list
ZHAL>
Thank you