Netgear WNDR3700v5 hardware observations / experiments

Report problems and success stories with Gargoyle on various hardware platforms.

Moderator: Moderators

pythonic
Posts: 280
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by pythonic »

se325919 wrote:
Sat Dec 20, 2025 10:20 am
The hardware part is simple enough. Unfortunately for me, the software side of things looks very much out of my depth.
Although still requiring software understanding to implement, I've just remembered seeing a reference to mtd-concat in this thread which could make it easier than I earlier thought. Being able to use mtd-concat would allow you to join the existing root filesystem/overlay space to the free space at the end of the larger flash. Provided the device boots from the larger flash, the changes to do this are all in the OpenWrt environment and you would likely get away without needing to change the bootloader at all.

There are quite a few existing examples of devices using this functionality (I count at least 20 in the ramips target alone for OpenWrt 24.10). My suspicion is that after copying the contents of the old flash to the new flash you would just need to define a new partition in the device tree for the unused space and then add the reference combining the new and existing partitions to the device tree. In theory, this would only require building a new device tree binary. While it isn't that hard to extract a DTB (device tree binary) from an image using tools like binwalk, and decompile/compile DTBs to/from source (DTS) using dtc, there aren't any convenient tools to replace the DTB in an image with a modified DTB while preserving the image structure so building the full image from source becomes a necessity.

At least Netgear bootloaders usually have reliable and relatively easily used ways to flash back factory images...

I've never tried to do this myself so the above is hypothetical - be careful and do your own research!

se325919
Posts: 24
Joined: Fri Dec 05, 2025 10:00 pm

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by se325919 »

Thanks again Pythonic. There is certainly hope there. I will see if I can get hold of another router for the home for now which will allow me to take this one away to the workshop and mess about with it more. I'm sure I will be coming back for more advice later. You have been really helpful in finding things that confirm that what I have in mind is not impossible.

se325919
Posts: 24
Joined: Fri Dec 05, 2025 10:00 pm

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by se325919 »

Hi Lantis, pythonic and all. I am back after some time.

I have gone ahead and swapped out the NOR chip for one exactly twice the size (32MiB).

Before doing that, I used a CH341 chip programmer to copy the data from the old chip (I flashed it back to Netgear factory firmware first just as a precaution). I then wrote that data to the new chip before soldering it to the PCB. I was happy to see that the router still booted and worked normally. Once that was ascertained, I decided to flash the latest build of OpenWRT onto it, which worked, but predictably it only shows the same space as before.

The reason I went to OpenWRT is because it has a GUI that lets you save out the u-boot, u-boot-env and factory partitions as bin files. Maybe Gargoyle also has this, or maybe you can do it from the command line, but this is the way I did it anyway.

I have created a Debian virtual machine and followed the OpenWRT guide to make it into a build environment. Someone on the OpenWRT forums kindly pointed me to the DTS file that I need to modify, which is here:
https://github.com/openwrt/openwrt/blob ... 700-v5.dts

I think I am some way to understanding how the DTS file describes the flash layout of the device and mentions where partitions start and how large they are, but I don't understand where this file is used. I can probably have a go at modifying it, but have no clue what to do with it after that.

I have a thread ongoing over on the OpenWRT forums at this link:
https://forum.openwrt.org/t/i-have-swap ... 0v5/245092

There has been some useful info provided there already and I feel I am getting nearer to realising the objective, but still in need of help.

I'm down to the 'menuconfig' section on this page:
https://openwrt.org/docs/guide-develope ... uildsystem

but kind of confused where the DTS file comes in and how I put that into the build as it doesn't seem to mention anything there. Any more help would be most appreciated.

Lantis
Moderator
Posts: 7316
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia
Contact:

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by Lantis »

Yes the DTS needs modifying for sure and sounds like you’re on your way to completing that.
It should be sufficient to modify the file and then start a build. The modified version will be referenced.

It may be useful to export a diff of this file in case you need to reset your environment for some reason, to avoid losing your work. Or save a copy of the file outside the build environment.

If this all works I can assist with how you can do the same in Gargoyle. Same concept but different steps.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog

se325919
Posts: 24
Joined: Fri Dec 05, 2025 10:00 pm

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by se325919 »

Hi everybody. I am back again after some time away. I had been using OpenWRT for a while on my Netgear R6220, but the latest update of OpenWRT has made my NetBird connection mega slow and once disconnected it is usually impossible to connect again without a reboot of the router. It was working well on 24.10 (and possibly even 25.12rc1), but something in later versions has ruined it. So I find myself back here thinking about Gargoyle once again.

I would like to go back to try and resurrect my WNDR3700v5 again with its upgraded flash chip.

A couple of questions. Has there been any advancement with Gargoyle in the meantime? What is the latest supported version of NetBird on Gargoyle as of now?

Lastly, is there anybody who could potentially either make a Gargoyle image for me that would allow me to utilise the extra free storage space on my double-sized chip? Or if not make it for me, then perhaps help me to do it myself perhaps using screen sharing. I have tried and failed with OpenWRT and I feel like the crew over on the OpenWRT forums don't really have time for anybody who is not a Linux expert.

Lantis
Moderator
Posts: 7316
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia
Contact:

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by Lantis »

No major moves forward with Gargoyle, just to the latest point release of 24.10.
Netbird version will be unaltered since you last used it.

Do you want to use OpenWrt or Gargoyle?
Whichever one, the first step is to successfully compile a standard (no modifications at all) image for your device. This proves your build environment works and that you can produce something usable.
What have you tried so far to achieve this bit?

Beyond this, the things you will need to do (in general...):
1. Modify the DTS file
Need to understand if the bootloader forces the factory partition to be loaded from a specific memory address or not. If so we can't move it. If it doesn't, you could relocate it to the end of the flash chip and then expand the firmware partition to fill the space.
If you can't move it, I would create a split partition using the mtd-concat approach.
Example
2. Change the mk recipe to pad to the new size
You need to calculate this new size based on how you choose to expand your partition.
3. Bump the DEVICE_COMPAT number and associated message
This is to protect yourself from flashing mistakes in the future. This is covered in the mtd-concat example above as well.

But first things first. Compile a plain old image. If you can't do that you are a long way from thinking about the changes needed.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog

se325919
Posts: 24
Joined: Fri Dec 05, 2025 10:00 pm

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by se325919 »

Thanks for your reply, Lantis.

At some point along the way I did manage to make a successful standard image of OpenWRT 24.10 but then someone on their forum criticized me for building an out-dated version and said I should be using the current one. They gave me some confusing instructions about how to "pull" the latest version but that didn't seem to go well for me. I think it broke my build environment as I was not able to build anything more after that and I gave up.

I have studied the DTS file and it does make some sense to me, but I have no idea where this fits into the build process as I don't recall it asking for a DTS file at any point along the way.

I don't really mind if it is Gargoyle (love the GUI) or OpenWRT as long as I can get it working.

I don't think I can do any harm to the device as I have fitted an external socket for serial access, and I also have a complete dump of the factory firmware which I can flash back onto the chip using a clip and a CH341 programmer if it comes down to it.

Lantis
Moderator
Posts: 7316
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia
Contact:

Re: Netgear WNDR3700v5 hardware observations / experiments

Post by Lantis »

Perfect, at least you are low risk from a recovery point of view anyway.

If you’re going with OpenWrt it would make sense to switch to 25.12 but it honestly doesn’t matter for now.
You would “git switch openwrt-25.12”, then a “make clean” to remove all old build artefacts, then the same process you used to compile.

The DTS file is part of the recipe for making your device, it is referenced by the build process. By modifying it we are changing the outcomes, no prompts etc needed.
What you should be aware of is that you are modifying files in the code repository and if you do anything that would reset those files you will lose your changes, so keep a copy outside the working directory for reference.

Let’s get a compile working then go to next steps.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog

Post Reply