OpenWrt build for ZBT z8102ax - M2-a -t (v2)

Please test https://releases.openmptcprouter.com/v0.62-6.6/z8102ax_128m/targets/mediatek/filogic/openmptcprouter-v0.62-6.6-r0+28431-92e020b50f-mediatek-filogic-z8102ax-128m-squashfs-sysupgrade.bin and/or v2 from http://aturnofthenut.com/autobuilds/ZBT-Z8102AX-GO2025-05-01-ABSmn.zip

Done, but with similar results:

Note:
I messed up before this, so the original UBI partition was modified (well the original firmware was crap anyway :slight_smile: ) I do not have the original fw on the ubi mtd partition..

So my upgrade procedure is:

  1. Boot via serial console using the openwrt-24.10.1-mediatek-filogic-zbtlink_zbt-z8102ax-initramfs-kernel.bin image via tftp
  2. Copy the openmptcprouter-v0.62-6.6-r0+28431-92e020b50f-mediatek-filogic-z8102ax-128m-squashfs-sysupgrade.bin to the /tmp folder
  3. Perform sysupgrade -F openmptcprouter-v0.62-6.6-r0+28431-92e020b50f-mediatek-filogic-z8102ax-128m-squashfs-sysupgrade.bin

Trying the above file:

root@OpenWrt:/tmp# sysupgrade -F openmptcprouter-v0.62-6.6-r0+28431-92e020b50f-mediatek-filogic-z8102ax-128m-squashfs-sysupgrade.bin
Thu Jan  1 00:05:20 UTC 1970 upgrade: Device zbtlink,zbt-z8102ax not supported by this image
Thu Jan  1 00:05:20 UTC 1970 upgrade: Supported devices: z8102ax-128m
invalid sysupgrade file
Image check failed.
Thu Jan  1 00:05:29 UTC 1970 upgrade: Device zbtlink,zbt-z8102ax not supported by this image
Thu Jan  1 00:05:29 UTC 1970 upgrade: Supported devices: z8102ax-128m
invalid sysupgrade file
Image check failed but --force given - will update anyway!
Cannot save config while running from ramdisk.
Thu Jan  1 00:05:30 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
Watchdog does not have CARDRESET support
Thu Jan  1 00:05:31 UTC 1970 upgrade: Sending TERM to remaining processes ...
Thu Jan  1 00:05:31 UTC 1970 upgrade: Sending signal TERM to netifd (1969)
Thu Jan  1 00:05:35 UTC 1970 upgrade: Sending KILL to remaining processes ...
Thu Jan  1 00:05:35 UTC 1970 upgrade: Sending signal KILL to netifd (1969)
[  343.454663] stage2 (3472): drop_caches: 3
Thu Jan  1 00:05:43 UTC 1970 upgrade: Switching to ramdisk...
Thu Jan  1 00:05:44 UTC 1970 upgrade: Performing system upgrade...
verifying sysupgrade tar file integrity
[  346.850666] block ubiblock0_1: released
Volume ID 0, size 45 LEBs (5713920 bytes, 5.4 Mi[  347.017053] ubi0 error: 0xffffffc0805cdcbc: not enough PEBs, only 442 available B), LEB size 126
[  347.025481] ubi0 error: 0xffffffc0805cdc18: cannot create volume 1, error -28
976 bytes (124.0 KiB), dynamic, name "kernel", alignment 1
ubimkvol: error!: cannot UBI create [  347.042009] reboot: Restarting system

...
ubi0 error: scan_peb: bad image sequence number 1744562312 in PEB 512, expected 418050938
Erase counter header dump:
        magic          0x55424923
        version        1
        ec             1
        vid_hdr_offset 2048
        data_offset    4096
        image_seq      1744562312
        hdr_crc        0xaea3c922
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 00 00 08 00 00 00 10 00 67 fb e8 88 00 00 00 00  UBI#....................g.......
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae a3 c9 22  ..............................."
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd6, error -22
UBI error: cannot attach mtd6
UBI error: cannot initialize UBI, error -22
UBI init error 22
Please check, if the correct MTD partition is used (size big enough?)

So I did some additional digging into the UBI partition

ubinfo /dev/ubi0 -a gives:

ubi0
Volumes count:                           1
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     512 (65011712 bytes, 62.0 MiB)
Amount of available logical eraseblocks: 442 (56123392 bytes, 53.5 MiB)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  19
Current maximum erase counter value:     3
Minimum input/output unit size:          2048 bytes
Character device major/minor:            249:0
Present volumes:                         0

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        45 LEBs (5713920 bytes, 5.4 MiB)
State:       OK
Name:        kernel
Character device major/minor: 249:1

And mounting it gives a empty partition of 4 MB size:

root@OpenWrt:/tmp# mount -t ubifs ubi0 /mnt
[ 1681.013022] UBIFS (ubi0:0): default file-system created
[ 1681.018611] UBIFS (ubi0:0): Mounting in unauthenticated mode
[ 1681.024403] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 3475
[ 1681.059300] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "kernel"
[ 1681.066733] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 1681.076648] UBIFS (ubi0:0): FS size: 4444160 bytes (4 MiB, 35 LEBs), max 45 LEBs, journal size 1015809 bytes (0 MiB, 6 LEBs)
[ 1681.087859] UBIFS (ubi0:0): reserved for root: 209908 bytes (204 KiB)
[ 1681.094295] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 0D9895F4-B42B-4CA2-AE02-1C6E62147009, small LPT model

root@OpenWrt:/tmp# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   493.8M     25.6M    468.2M   5% /
tmpfs                   493.8M     17.3M    476.4M   4% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
ubi0                      3.1M     24.0K      2.9M   1% /mnt

Probably have to recreate the whole thing by hand...
any tips much appreciated..

Please open a new thread for more visibility

Thanks switched to here

1 Like

@maurer Thanks a lot for your PR for version V2, I am going to check to check if I have DRAM or eMMC and I will wait your PR to get approval. Great job !!

I have connected console to serial port and I get this

NOTICE:  EMI: Detected DRAM size: 1024MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  CPU: MT7981 (1300MHz)
CPU:   MediaTek MT7981
Model: mt7981-rfb
       (mediatek,mt7981-rfb)
DRAM:  1 GiB
Core:  38 devices, 14 uclasses, devicetree: embed
Initializing NMBM ...
spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
  1. So I understand that I have NOT eMMC version, so I only need to wait openwrt new firmware update with your PR, don't I?
  2. Could I make any kind of recovery backup with serial port connected? (just in case) Or it is no neccessary as throught serial port I coudl flash any thing that I want in future?

Thanks a lot

NOTE: I have tried to download your precompiled firmwre but it doesnt work. Do I need to flash throught V2 original firmware flash GUI?

1 Like

No, you need to flash it from the bootloader recovery ui. Can you post a serial console log of the failure?

Sorry, I mean about the link to download it. I haven't tried yet anything related with flash
(do you know about my questions 1 and 2 ?)

Thanks

I'll rebuild the image and post it on some other (more reliable) hoster (hopefully).
for:
1- it looks like it's not the emmc version
2: - you would have to back it up from original fw and can't really help you there.

I advise you to open a new thread with these 2 questions for more visibility.

@juan3211 here is the new url https://filebin.ca/8iIbQfE5lKet/openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-v2.zip (good for 6months hopefully and a mirror https://0x0.st/8xAp.bin)

1 Like

Hello everyone,
as I got this router recently, too, I want to jump in and help testing.
I definitely want to replace the stock FW as it is abysmal, (tho occasionally also entertaining with gems like these:)
image

So before I brick anything, I want to confirm a few things.

  1. I bought it recently via a friend from pinduo, so it might be some chinese version ... is there anything I should pay attention to ?
  2. On the mainboard I see V2 printed after the model num, so can I assume it is V2
confirmed it's indeed v2

Should I still reconfirm just by booting into Recovery GUI ?
(update: ok, that was easier than expected,
it says
ZBT MT7981 Uboot V2.0 FIRMWARE UPDATE
U-Boot 2023.07 (Sep 20 2023 - 05:14:31 -0700)

  1. As I have this CP2102 USB to TTL Serial Adapter,
    Should I also check the output of that before doing anything ?
    Maybe checking for any specific things ?

  2. And finally, should I get the openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-v2.zip from above ?
    or the one from the github PR ?
    https://github.com/openwrt/openwrt/pull/18514#issuecomment-2862004484

Thanks

Hi to everyone and thanks to maurer for his job.
I have a z8102ax m2 a t. And it is V2, checked with the recovery screen. My model is not the eMMC version. I tried both the versions posted by maurer (sysupgrade and factory) and both times I got this error: "something failed". See the image. Total noob here, actually the firmware is the 21.02 openwrt from the factory. (I reversed also to ZBT os, to performing the flashing but no success either, the zbt os said wrong file.

any idea or help?

the one from the link above if you want openwrt vanilla - the ones from the github link are diverged forks - only recommended for specific cases

please connect a serial console and post the log of the failed upgrade

1 Like

Thanks maurer for you answer. Apart from getting a usb to ttl cable, and open the access point to access serial console, what are the step to see the log? Sorry, but there is a total noob here

It'll show as soon as you do something, like attempt to flash or try to boot any firmware.

Start by reading thw wiki https://openwrt.org/docs/techref/hardware/port.serial

ok thanks both for your replies, I started read the wiki about the serial port. I will make some experiments soon

Serial's like an unfiltered kid, everything comes out...

I am getting pretty much the same annoyingly unspecific error output with the openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-v2-squashfs-factory .

(I just tried to run it again, it said update successful the second time, but nothing happened, and seems the router was in a bootloop or something),

I will admit it's too late and I should be sleeping but I was just too curious. So I just report my quick findings:

Instead of doing debugging via the serial, I just tried the ROOter image instead.
ZBT-Z8102AX-V2-MWAN3-GO2025-05-30-upgrade working for me it seems.

1 Like

firstly I know ROOter image is <> Openwrt and we probably should not talk in this forum, but how you did the upgrade? USing Uboot splash screen or openwrt upgrading section of the firmware? I also tried ZBT-Z8102AX-V2-MWAN3-GO2025-05-30 but didn't work for me.
Btw I found this on another forum (see the last message) that could work (I assume they are talking about v2 since they talk about a new bootloader) and also could be helpful for maurer
x-wrt-24.01-b202401270830-mediatek-filogic-zbtlink_zbt-z8102ax image on devices with U-Boot BL31 v2.7 permantly rebooting ยท Issue #40 ยท x-wrt/build-release

why shouldn't we talk about that ?
isn't it based on openwrt, too ? (at least that's what cgpt told me :stuck_out_tongue: tbh I was too lazy to dig deeper so I still don't fully get the differences, except ROOter is more mobile focused with more modems support, etc)

Anyway I was just stating it as a fact, that ROOter did boot up, so whatever they did there, worked on my model.

i did use the recovery ui, i guess Uboot splash. definitely not within the upgrade section of the normal admin interface.

I will do now both serial captures. from ROOter and what fails with this build.

well I have read some topics where who installed ROOter and then had problem was advised to ask help in their forum not here....anyway thank you for your suggestion. As for me I opened the router and located the serial pins. I will receive the usb to ttl cable I bought on amazon on Wednesday, so untill that I'm a bit stuck

Ok yeah, that's a fair point ofc. If someone wants support for ROOter they should ideally go first to their forums, that makes sense.

It wasn't even that much of a suggestion. That was literally just a test bc I wanted to check what works and what doesn't :wink:

So ... I did the term logs, they are more messy than I thought:
As uboot did just exit after a certain time (of inactivity or just some general timeout, anyway, that was annoying and the term outputs are messy bc of that).

Idk how much I should upload here or not, at least I found the part where the FW openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-v2-squashfs-factory fails to boot:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ...

[ 0.601877] Creating 5 MTD partitions on "spi0.0":
[ 0.606659] 0x000000000000-0x000000100000 : "bl2"
[ 0.612457] 0x000000100000-0x000000180000 : "u-boot-env"
[ 0.618544] 0x000000180000-0x000000380000 : "Factory"
[ 0.625262] 0x000000380000-0x000000580000 : "FIP"
[ 0.631551] 0x000000580000-0x0000077a0000 : "ubi"
[ 0.849463] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc081580000, irq 75
[ 0.859416] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc081580000, irq 75
[ 0.869213] i2c_dev: i2c /dev entries driver
[ 0.875304] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[ 0.884512] NET: Registered PF_INET6 protocol family
[ 0.890559] Segment Routing with IPv6
[ 0.894284] In-situ OAM (IOAM) with IPv6
[ 0.898245] NET: Registered PF_PACKET protocol family
[ 0.903545] 8021q: 802.1Q VLAN Support v1.8
[ 0.931549] phy phy-soc:usb-phy@11e10000.1: type_sw - reg 0x218, index 0
[ 1.010198] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[ 1.018965] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1.030313] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=79)
[ 1.053206] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=80)
[ 1.075891] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=81)
[ 1.098468] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=82)
[ 1.110093] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[ 1.116855] DSA: tree 0 setup
[ 1.120613] UBI: auto-attach mtd4
[ 1.123976] ubi0: default fastmap pool size: 45
[ 1.128496] ubi0: default fastmap WL pool size: 22
[ 1.133297] ubi0: attaching mtd4
[ 1.894994] ubi0: scanning is finished
[ 1.898798] ubi0 error: ubi_read_volume_table: the layout volume was not found
[ 1.906198] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[ 1.913301] UBI error: cannot attach mtd4
[ 1.917447] clk: Disabling unused clocks
[ 1.921932] /dev/root: Can't open blockdev
[ 1.926033] VFS: Cannot open root device "" or unknown-block(0,0): error -6
[ 1.932998] Please append a correct "root=" boot option; here are the available partitions:
[ 1.941348] 1f00 1024 mtdblock0
[ 1.941354] (driver?)
[ 1.947871] 1f01 512 mtdblock1
[ 1.947875] (driver?)
[ 1.954396] 1f02 2048 mtdblock2
[ 1.954401] (driver?)
[ 1.960916] 1f03 2048 mtdblock3
[ 1.960920] (driver?)
[ 1.967446] 1f04 116864 mtdblock4
[ 1.967450] (driver?)
[ 1.973970] List of all bdev filesystems:
[ 1.977965] ext3
[ 1.977968] ext2
[ 1.979881] ext4
[ 1.981800] squashfs
[ 1.983713] f2fs
[ 1.985975]
[ 1.989366] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.997611] SMP: stopping secondary CPUs
[ 2.001523] Kernel Offset: disabled
[ 2.004998] CPU features: 0x0,00000000,00000000,1000400b
[ 2.010298] Memory Limit: none
[ 2.015447] pstore: backend (ramoops) writing error (-28)
[ 2.020834] Rebooting in 1 seconds..

So I'll be waiting for @maurer 's input,
if that's enough, or you need the whole log, or anything else, and if i should upload them here in full, or per DM.
(tho I prefer not to post any MACs)

I have also a term capture of the ROOter running.
AND another one:
On the weekend I wrote to zbt support, referencing their site and saying they write openwrt support.
without much other info, they just send me this bin file Z8102AX-NAND-MT7981-v7.6.7.2-25.0414_151409.bin

I did capture the term output of that, too.
Here's the overview from the login page, looks a bit dated, but well it does run.

System
Hostname	OpenWrt
Model	ZBT-Z8102AX
Firmware Version	OpenWrt 21.02-SNAPSHOT 25.0414_151409
Kernel Version	5.4.246
Local Time	2024-05-16 08:41:30
 
...

 Powered by LuCI openwrt-21.02 branch (git-22.335.71649-0ecaf74) / OpenWrt 21.02-SNAPSHOT unknown 25.0414_151409

So @Walfarash , I can either send you that file too for testing, or you talk to the zbt support, too in case you have some different variant/version.

Also, while nice that they actually replied quickly during working hours and gave that FW,
regarding GPL and stuff, aren't they supposed to also release the source code for that somewhere ?

I'd definitely rather prefer to build my own, or get it from trusted members from the forums, here.

My other other issue with the zbt wrt version is that the country settings are very limited. I guess I could just do the closest (country region) channel config/ settings to the country i'm currently in, but still that is rather annoying and unnecessary why it's missing.

Hmm I wanted to post some gems/lolz I found but I can only do one embedded media per post as a new user
Maybe later ... if i don't forget ...

Oh and one last thing
I saw this in the outputs of ROOter and the zbt one:

[ 1.010198] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[ 1.018965] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx

on their website they say only 1gbit, so can we run it with 2.5 / unlock it ?