Porting WNDR4300 to ath79

Hi, I'm porting the Netgear WNDR4300 to the ath79 target. I have a fork of the OpenWrt repository at https://github.com/Zsub/openwrt/tree/ath79-wndr4300. I can currently boot the device via tftp/serial, but the device doesn't reach a prompt yet.

I'll push frequently to that branch, if and when it becomes a PR I'll probably create another branch and squash commits.

1 Like

I have also started working on that same device.
NAND driver is the biggest challenge.
You need to specify partitions in the DTS.

1 Like

Someone else mentioned the NAND as well. Personally, I'd like to just get it booting from ramdisk almost fully functional, with networking etc. Then fix the NAND driver after.

That could be a good approach too.
I cant test images as I dont have a WNDR4300 at all.

NAND driver needs updating to read properties from DT bindings instead of using low level functions like in ar71xx

Oh wow, porting blind :slight_smile: I find it difficult enough with the physical device and serial access :slight_smile: I have shamelessly copied some values from your dts.

Its difficult,but that is why its a challenge.
I am doing it mostly because of the NAND driver,I gotta look if we have some more 8devices Rambutan boards at work as those are the only ones with NAND I have access to.

Dont worry about copying values from DTS

I managed to get a response from the USB device, which is encouraging. Decided to take a step back and try to load ethernet stuff before looking into wifi.

[    0.713948] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.722436] ehci-platform: EHCI generic platform driver
[    0.728038] ehci-platform 1b000000.usb: EHCI Host Controller
[    0.733833] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    0.741897] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    0.777492] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    0.784658] hub 1-0:1.0: USB hub found
[    0.788921] hub 1-0:1.0: 1 port detected
[    0.796066] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.804157] ohci-platform: OHCI generic platform driver

Everything should be pretty easy except for the NAND driver which is rather complex

I have little previous embedded experience so it is a fun journey of discovery :slight_smile:

Nice development that you started to port the WNDR4300 to ath79. I also use this router. I was also thinking in looking into porting it to ath79 but I don’t have serial access to the device so I can’t see the booting process. @hertog_jan Is serial access really necessary or is it possible to just use the builtin tftp upload a new firmware and start over if the router doesn’t boot?

I think serial access is required, otherwise you can't see what the output is and what is wrong with your firmware.

You probably can send another attempt via tftp recovery, but I wouldn't count on it.

you can't do it without if you want to start porting, but that should be the smallest problem

@hertog_jan @lucize Thank you for the quick reply, I understand its necessary.

I have managed to find working values so both network PHYs are recognised, meaning both WAN and LAN ports are working, although they use random mac addresses because there is no way to read those from NAND currently.

I may help to test if someone makes a build.

Any updates?

FYI - if you change KERNEL_PATCHVER to 4.19 for the ath79 Makefile, you may find the NAND driver to be MUCH easier now.

Try taking a look at the GL.iNet AR300M NAND configs for inspiration.

I have a question (which is likely needed for GL-AR750S) - do either of you know what the replacement for the "ubinize" INI files for the WNDR4300 v1 is in the ath79 tree?

The GL.iNet NAND devices use these in GL.iNet's modified OpenWRT source, but I can't find any equivalent to these in ath79. This hasn't been a huge issue for AR300M because kernel and source are both on the same device, however in the AR750S, it appears that kernel is always in NOR and rootfs location depends on whether you're a NOR or NAND build.

I dont have the device and dont plan on doing any work.

Hi there are you still working on this?


Nope, after discovering the NAND driver needed to be ported I decided I was in way over my head. I have little need for it as well, as I have completed a rewire and bought a new router.

1 Like