Askey RAC2V1K / RT4230W REV6 Support

All of the stable initramfs images here boot fine but are useless because they don't have compatible ethernet or wifi modules. I'm trying to build my own image but it keeps crashing when it tries to set up power management (I assume). Can anyone help out with this? Here's the boot log. The same also happens with snapshot images.

Apparently booting via initramfs will not work any longer due to this patch:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/pci/controller/dwc?h=v5.4.43&id=0b24134f7888175c9638e6fd1900e23e44fc172f

My Netgear R7800, which is very similar to the Askey RAC2V1K, also could not boot properly. WiFi interfaces will not come up. Even after I reverted the 'offending' patch, the warnings (which you also saw in your posted bootlog) were gone, but the WiFi interfaces are still missing.

I was told the only way to test now is to flash it into the router.

Well I rebuilt openwrt with the 4.19 kernel instead if 5.4 and the pci error is gone now but I still get the regulator errors at the end. Here's the new boot log.

Edit: To use 4.19, edit target/linux/ipq806x/Makefile and change KERNEL_PATCHVER. Also, do you know how to get a dts file from a dtb file?

You need some tools to do that. This link may help:

Alright so I got some device tree files out of it. I uploaded all the dtb files here and converted them to dts files. I think the main thing that's different is the nand. On the wikidev page it says it has Spansion flash but on one of the routers I have it's MXIC flash

Yet another edit: if you run cat /proc/device-tree/model you can see what revision your board is

mtd no offset!
check here Spectrum RAC2V1K TTL SSH Firmware(about Askey 4230W)

Alright I got openwrt mostly working on this router. It's on 4.19 kernel because of the issue 4 posts above. Here's a list of things that are working, working but needs more testing / more work, and broken:

Working:
Booting (only over tftp)
Serial console
Reset button

Needs testing:
Networking (I'm not sure if the offsets for the ART partition are consistent across all of these routers and I'm only getting 200mbps wired instead of the 500mbps it's usually capable of on my internet)
WiFi (Same issue as above)
Front LED (Askey uses 3 gpios to do like 7 or 8 different things)
WPS Button (Can't figure out the correct GPIO pin)
Not all the ram is being allocated

Not Working:
Flashing to nand flash (the mtd partition layout is confusing, it looks like it boots from a ubi partition by default, it looks like some routers use different flash chips, and none of the uboot commands have a help)

I'll make another post in a bit with info on how you can help with networking and wifi.

Turning on software flow-offload should help.

Do you need to reboot for that to take affect? I tried enabling it but it didn't help much.

There's no need to reboot. It's odd tho that an ipq8065 board could only do 200mbps. Try setting the CPU governor to performance and try again.

I'll try that in a bit. I'm making the tutorial for trying out the firmware.

right
some routers use different flash chips

mtd none offsets

mtd none offsets

I really don't get what you mean by that.

Sorry i don't speak english

mtd has no partition offsets

It actually does but they get defined by uboot. Before linux loads, there's a line like this mtdparts=nand0:256K@0x0(0:SBL1),1280K@0x40000(0:MIBIB),1280K@0x180000(0:SBL2),2560K@0x2c0000(0:SBL3),1152K@0x540000(0:DDRCONFIG),1152K@0x660000(0:SSD),2560K@0x780000(0:TZ),2560K@0xa00000(0:RPM),5M@0xc80000(0:APPSBL),512K@0x1180000(0:APPSBLENV),1280K@0x1200000(0:ART),384K@0x1340000(0:BOOTCONFIG),1280K@0x13a0000(0:SBL2_1),2560K@0x14e0000(0:SBL3_1),1152K@0x1760000(0:DDRCONFIG_1),1152K@0x1880000(0:SSD_1),2560K@0x19a0000(0:TZ_1),2560K@0x1c20000(0:RPM_1),384K@0x1ea0000(0:BOOTCONFIG1),5M@0x1f00000(0:APPSBL_1),99M@0x2400000(rootfs),99M@0x8700000(rootfs_1),22M@0xea00000(ubifs),

This is what tells linux the partition sizes and offsets

Edit: if you interrupt uboot and run smeminfo, it will tell you where each partition starts and what the size of it is in a more readable format

2 Likes

Here's a tutorial on how you can try it: https://pastelink.net/1p69j
I'll upload the build files a bit later when I figure out how to use git.

1 Like

SAC2V1K no Web?
Unplug the network cable
try http://router.charter.net/wan_down.html

It doesn't have a web interface at all. The only way to change settings is with the My Spectrum app

So things are still a bit broken. Only 256M of ram is being seen and the /sys/devices/system/cpu/cpufreq/ directory is empty

New update, I'm using a SAC router to test things instead of the RAC one I have because I'm using it as my main, and its flash chip is only 256M instead of the 512M that's on deviwiki. I just found this out because I was trying to dump the nand with "nand read" and "tftpput" but whenever I specified anything higher than 255M I would just get a "Attempt to read outside the flash area" error. Also for some reason it's just not letting me dump the thing in general. It just gives me a "NAND read from offset 0 failed -74" error.

If you have serial access , just interrupt uboot and copy the boot log. I want to see the likelihood of the flash being 256 or 512

Edit: 3 consecutive replies aren't allowed apparently so im editing this.
Luckily it seems like we have about 230M of space (0xDC00000 in hex) for all of the openwrt goodies and booting seems easy enough.