Adding OpenWrt support for Zyxel EX5601-T0

Normally <> always, imho.

I'm guessing u-boot layout maximizes the flash space for additional packages.

https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=EX5601-T0

I'm sorry for being a bit thick here, but I still don't understand this fully.

So when installing OpenWRT for an EX5601 for the first time, should one choose the u-boot variant instead of the stock variant? Is there a downside for that option?

In the installation instruction of the non-u-boot variant that can be found from the git commit https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=1c05388ab04c934ec240e8362321908f91381a90 I can see that the sysupgrade image is used, no mention of the factory image. In which case would you use the factory image then?

that's up to you, unless it's a two step rocket, where you need to go vanilla, before you can go u-boot.

going back to the zyxel fw might be harder, or even (not likely though) impossible with the u-boot layout.

follow the git instruction, no idea when the factory image is to be used, it might not be needed, ever.

Do you guys need the voip functionality?
If yes stick with the original firmware. Openwrt does not support that.

Do you want to go fully back to the original state of the router?
Stick with the stock openwrt firmware as that will keep zloader, ubi and ubi2. Ubi will contain openwrt and ubi2 will have the original firmware. In this way you will be able to manually swap partitions and from ubi2 you can replace openwrt with the original firmware.

You don t care at all about the zloader and original router partition table?
Go with the u-boot firmware version. That will give you bigger ubi partition and ubi2 will go away.

Considering the above make your choice and the original git procedure only works for stock zyxel firmware with no signature verification ACDZ0.X versions.

Zyxel added signature verification and locked the main root procedure with acdz2 hence you need to use another way: mtk_uartboot. Look for this word in this thread and you will get the procedure.

1 Like

Brilliant summary, thank you. Just looking at the router/wireless functionality with no intention to back to original Zyxel firmware. Will go with the uboot version.

Running mtk_uartboot here, and it seems to detect the device when I switch it on, but times out during the process. Any suggestions here:

~/mtk_uartboot-v0.1.1-x86_64-unknown-linux-gnu# ./mtk_uartboot --serial /dev/ttyUSB0 --aarch64 -p bl2-mt7988-ddr4-ram.bin -f openwrt-23.05.5-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip
mtk_uartboot - 0.1.1
Using serial port: /dev/ttyUSB0
Handshake...
hw code: 0x7986
hw sub code: 0x8a00
hw ver: 0xca01
sw ver: 0x1
Baud rate set to 460800
sending payload to 0x201000...
Checksum: 0x962
Setting baudrate back to 115200
Jumping to 0x201000 in aarch64...
Waiting for BL2. Message below:
==================================
==================================
Timeout waiting for specified message.

What is the correct source for the bl2-mt7988-ddr4-ram.bin file? I got mine from https://github.com/981213/tf-a-mtk/releases/tag/v2.10.0-mtk

I notice the checksum in the mtk_uartboot printout is different than for example in @InjectMeneer 's post above. I wonder if that is of any significance here.

@trsqr it's posted under: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/

Look for mt7986-ram-ddr4-bl2.bin, which is located at the bottom of the page, under the "Supplementary Files" section.

Direct download link: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/mt7986-ram-ddr4-bl2.bin

1 Like

Ok, I managed to update to the stock Zyxel EX5601-T0 OpenWrt firmware now. I could not get mtk_uartboot to work and since my firmware was ACDZ.2 I had to start by downgrading the firmware to ACDZ.0 as stated in post 305. Then I could use the method described in the git commit to install OpenWrt on ubi partition.

1 Like

In addition, there seem to be some issues on how to obtain the boot loader bin file bl2-mt7986-ddr4-ram.bin. Here's a detailed explanation on where to get it:

1 Like

Thank you, that was it. Now I got also the ubootmod version running.

1 Like

I was using OpenWRT on this router for quite a while, but recently decided to update, and i wanted to ask a question. Was the issue of SFP cage not working fixed? Because i had to get two scripts from original firmware and patch the dts file to have fixed link on gmac1 for it to work, is it still needed? Or does it now work "out of box"? Sorry if this is a wrong place to ask, just in notes for the router it just says that voip doesn't work though it has nothing about SFP even when it was not working without this tinkering.

You still need to do that. Unfortunately there are no capabilities from the kernel side to handle that natively (at the moment). It is a work in progress from the kernel team.

Introduce PHY listing and link_topology tracking ha recently landed in the kernel after 1 year long of revision and new APIs for PHY isolation are in the works.

Once those two steps are completed a proper APIs for the drivers to swtich between the different ports can put in the work.

For now the multi-PHY is used only on SFP modules with integrated PHYs (autodetecion by phylink) and device specific drives will have to be updated to support additional "ports" on the same MAC.

Would it be possilbe to do the same with the stock version instead of ubootmod?

hi Guys, maybe someone could share a dump of the factory partition? I accidentaly erased my whole NAND. Its mtd2 if you are using ubootmod, or mtd3 if you are on the stock layout. Thanks a lot in advance!

Mmm this is not something that should be shared (the factory MTD). I mean the factory partition contains the mac addresses and other data that identifies specifically your router...

Yes, I know... however, that kind of data can be easily edited before sharing in any hex editors or even from OpenWRT console if you do not want to share your serial or mac. I could share mine if you could put it instead of yours :slight_smile: Unfortunately I cannot make WiFi up and running without that partition (normally) as it requires some tech data from that partition
thanks

for example mac part is used in 11_fix_wifi_mac script and it looks like it has offset 0x4

zyxel,ex5601-t0|\
        zyxel,ex5601-t0-ubootmod)
                addr=$(mtd_get_mac_binary "Factory" 0x4)
                [ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
                ;;

Issue solved, thanks :wink: