[solved] Making use of Netgear WNDR3700v4's 128 MB NAND flash

Dear fellow Forum Users!

Some years ago I bought a piece of the Netgear WNDR3700v4 router. For some time it just lay around, but now that OpenWRT 18.06 came around, I tried to update its firmware, by compiling OpenWRT from source.

I then obviously ran into the problem with the flash layout, that only around 11-12 MB are available in ubifs, and that there is a large unused partition at the end of the flash storage.
Then I was pointed to this bug/topic: https://bugs.openwrt.org/index.php?do=details&task_id=146

I went ahead and applied the patch, recompiled OpenWRT and did a sysupgrade to the new version, but to my surprise the amont of free space did not increase, even though the partition table now reflects the changes.

BusyBox v1.28.3 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 18.06.1, r7258-5eb055306f
 -----------------------------------------------------
root@bielefeld:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 5.3M      5.3M         0 100% /rom
tmpfs                    61.0M     76.0K     60.9M   0% /tmp
/dev/ubi0_1              11.2M     72.0K     10.5M   1% /overlay
overlayfs:/overlay       11.2M     72.0K     10.5M   1% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@bielefeld:~# cat /proc/cmdline 
 board=WNDR3700_V4 console=ttyS0,115200 mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c0000(firmware),256k(caldata_backup),-(reserved) rootfstype=squashfs noinitrd
# dmesg
[    0.000000] Linux version 4.9.120 (janos@debian-build.lan) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7188-b0b5c64c22) ) #0 Thu Aug 16 07:51:15 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
...
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=WNDR3700_V4 console=ttyS0,115200 mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c0000(firmware),256k(caldata_backup),-(reserved) rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
...
[    0.652162] random: fast init done
[    0.734428] mtd: ar934x-nfc: skipping zero sized partition
[    0.739996] 11 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.746461] Creating 11 MTD partitions on "ar934x-nfc":
[    0.751773] 0x000000000000-0x000000040000 : "u-boot"
[    0.758818] 0x000000040000-0x000000080000 : "u-boot-env"
[    0.766393] 0x000000080000-0x0000000c0000 : "caldata"
[    0.773649] 0x0000000c0000-0x000000140000 : "pot"
[    0.780497] 0x000000140000-0x000000340000 : "language"
[    0.787848] 0x000000340000-0x0000003c0000 : "config"
[    0.795049] 0x0000003c0000-0x0000006c0000 : "traffic_meter"
[    0.802868] 0x0000006c0000-0x0000008c0000 : "kernel"
[    0.809976] 0x0000008c0000-0x000007fc0000 : "ubi"
[    0.817532] 0x0000006c0000-0x000007fc0000 : "firmware"
[    2.160860] random: crng init done
[    2.541897] 0x000007fc0000-0x000008000000 : "caldata_backup"
[    2.550385] libphy: Fixed MDIO Bus: probed
[    2.559317] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
root@bielefeld:~#

What step may I have missed?
I even tried resetting the configuration of OpenWRT in the hopes that it would wipe and re-format the ubifs partition, so that would thus possibly be increased, but this does not seem to have worked.

You have to flash factory image not sysupgrade. I've done (and tested it) on R7800 a long time ago. Look here

Thank you! I flashed the -factory image via the TFTP method, and I the available r/w storage space went up to 9x MB.

I have the same router and i had the same problem here LEDE on WNDR3700v4 (available flash size)
sysupgrade can't help. It's partition is reduced manually so that sister board wndr4300 is not bricked when flashing openwrt. There is a patch which is described in my thread. This is one of the reasons why i compile my own version from sources to update my router.

I would like to ask about if flash the WNDR3700v4 to a 128MB openwrt version, can it direct upgrade to normal openwrt release? e.g. 18.06.1(128MBversion) > 18.06.4
let say will never go back to stock rom.

See Tutorial: Build custom Netgear R7800 firmware for a larger flash size/root space

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.