OpenWrt support for WAX206

Hello, do you have any news on the topic? I would like to support your efforts to port Openwrt to the wax206.

1 Like

I think this project is dead sadly, we should switch to wax202 which was added recently...

roll up your sleeves, and dig in ... there's no such thing as a free lunch.

Sorry, just rather busy with lots of other stuff. I did actually try to get it working upstream but so far that just hangs during boot while OpenWrt with 5.15 kernel at least boots. Let me just push whatever I have there in the hopes others may at least start testing. Thanks for your patience!

8 Likes

thank you for the time spent on this.

did you manage to include the Realtek 2.5GbE uplink port module ?

Okay, I pushed whatever little I had:

Currently, this gives me the following on the 2.5GbE WAN port:

[    3.453783] mt7530 mdio-bus:00 wan (uninitialized): validation of  with support 0000000,00000000,00006000 and advertisement 0000000,00000000,00000000 failed: -22
[    3.468280] mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY: -EINVAL
[    3.476107] mt7530 mdio-bus:00 wan (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5

Disclaimer: I only ever tried loading the initramfs via TFTP. The partitioning/sysupgrade stuff is not yet done!

Enjoy!

4 Likes

I will setup a new build enviorenment and give it a try these days.

3 Likes

Is it working?

1 Like

Sorry, I had some busy weeks at work. Until now, I can only say, that the image is building. Maybe I find some time for a test drive coming weekend.

1 Like

I'm collecting a bit of informations from the running Netgear OpenWrt 17.01 / Firmware Version V1.0.4.0 EU.

The output of the tool mtdinfo can be found in this github gist. It would be interesting to know if there are differences between the EU version (the one I got) and from other parts of the world. On mine there are 21 mtd partitions (see gist).

The output of fw_printenv can be found in [another github gist]. Again it would be interesting to know if there are differences between different "world" versions of the device.

I haven't soldered anything yet so no serial access for now (soldering is on not one of my strengths more weldding :slight_smile: ).

1 Like

mtdinfo is the same in my US version.

and fw_printenv is basically the same, with some whitespace differences

< fenv_region=US
---
> fenv_region=EU
63c63
< stringtableoffset=0x5bc0000 
---
> stringtableoffset=0x5bc0000
66c66
< wr_atf=filesize_check 0x20000;if test ${filesize_result} = good; then mtk_image_blks 131072;nand erase.spread 0x80000   ${filesize} ;mtk_image_blks 2048;nand write ${loadaddr} 0x80000 ${filesize};fi
---
> wr_atf=filesize_check 0x20000;if test ${filesize_result} = good; then mtk_image_blks 131072;nand erase.spread 0x80000	${filesize} ;mtk_image_blks 2048;nand write ${loadaddr} 0x80000 ${filesize};fi

hth. haven't soldered mine either but I got @sumo 's branch built I was trying to get the partition stuff figured out but I dont know what I'm doing lol never worked on openwrt before. it seems like encryption has been figured out for us already

Thanks @fn42 for checking!

I'm in a similar boat regarding the partitioning. The Netgear partitioning is interesting but I wonder what's the difference between ImageA (mtd5), Kernel (mtd6), kernel (mtd7) and Kernel_backup (mtd10). And can I mount them these partitions for inspection?

Maybe helpful for other:

For being able to ssh login to the router on Netgears firmware with pub/private keys I had to add the following to the ssh call on the client (on Linux Mint 21).

ssh -o HostKeyAlgorithms='+ssh-rsa' -o PubkeyAcceptedKeyTypes='+ssh-rsa' admin@<wax206 IPs>

That is of course after adding the public key with ssh-copy-id.

1 Like

not really sure lol

36M	mtd8.bin
38M	mtd10.bin
38M	mtd5.bin
38M	mtd6.bin

mtd5, 6, and 8 have the same exact files on the squashfs partition
mtd10 is older. maybe recovery


DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
131072        0x20000         Flattened device tree, size: 2638000 bytes, version: 17
131304        0x200E8         LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 7800800 bytes
2735688       0x29BE48        Flattened device tree, size: 32576 bytes, version: 17
2883584       0x2C0000        Squashfs filesystem, little endian, version 4.0, compression:xz, size: 23886565 bytes, 4274 inodes, blocksize: 262144 bytes, created: 2021-04-29 09:19:22

[arch@archlinux mtd]$ binwalk mtd6.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Flattened device tree, size: 2638000 bytes, version: 17
232           0xE8            LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 7800800 bytes
2604616       0x27BE48        Flattened device tree, size: 32576 bytes, version: 17
2752512       0x2A0000        Squashfs filesystem, little endian, version 4.0, compression:xz, size: 23886565 bytes, 4274 inodes, blocksize: 262144 bytes, created: 2021-04-29 09:19:22

[arch@archlinux mtd]$ binwalk mtd8.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Squashfs filesystem, little endian, version 4.0, compression:xz, size: 23886565 bytes, 4274 inodes, blocksize: 262144 bytes, created: 2021-04-29 09:19:22

[arch@archlinux mtd]$ binwalk mtd10.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
131072        0x20000         Flattened device tree, size: 2637876 bytes, version: 17
131304        0x200E8         LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 7800800 bytes
2735564       0x29BDCC        Flattened device tree, size: 32576 bytes, version: 17
2883584       0x2C0000        Squashfs filesystem, little endian, version 4.0, compression:xz, size: 24674517 bytes, 4226 inodes, blocksize: 262144 bytes, created: 2020-12-12 09:39:17

[arch@archlinux mtd]$ cat /mnt/mtd6/version 
Build User          : sd
GIT Revision        : cfc2c270
Build Time          : 2021-12-14 18:15:18

GIT Info:
mtk7622_mtk7915_wax206[cfc2c27063247e04e8fe2ebd805a451574ac2d84](Tue Dec 14 16:01:38 2021 +0800)
[arch@archlinux mtd]$ cat /mnt/mtd10/version 
Build User          : sd
GIT Revision        : 8ad2ee56
Build Time          : 2021-06-16 19:12:33

GIT Info:
WAX20X-Phase1-XF-20210425[8ad2ee56dce99d9064f7bfe64494a44486a92273](Wed Jun 16 18:43:52 2021 +0800)
1 Like

oh and I just grabbed these filesystems over telnet

# on desktop
nc -l -p 2234 > mtd5.b64.n
# ( wait for xfer)
tr -d '\r\n' < mtd5.b64.n > mtd5.b64
cat mtd5.b64 |base64 -d > mtd5.bin
# on the wax206
cat /dev/mtdblock5 |base64 |telnet 192.168.1.2 2234

I think the device have a dual/backup fw setup, when I reset mine (bought used), it went back to an older version of the fw.

I did use nanddump over ssh to backup the mtd partitions.

ssh wax206 nanddump -o /dev/mtd6 2>mtd6.stdout > mtd6.dump
1 Like

You mentioned that in an earlier post that after a reset you got reset to a previous version.

I did do a reset a few hours ago to see if that would happen too. But although my WAX206 did come with an earlier firmware out of the box it got reset to 1.0.4.0.

I don't think that happens at a normal reset. I soldered up the ttl header on my wax206 today and played a bit with luci interface on the original firmware. When tried to flash the 1.0.4.0 Firmware from luci, the bootloader said, that the image was corupt and reflashed to the previous firmware.

Has anybody been succesfull in booting the box via tftp? I wasn't succesfull.

Using bootm, yeah, there's no image worth writing to flash, yet.