I'm trying to get more space on WNDR4700 as it has a 128MB nand and only about 20MB is currently available to the user.
Similar subject was discussed here, but the OP went with solution that won't be accepted upstream.
I would like to solve it once and for all
My idea is to use just "eco" partition as additional ubi volume for rootfs_data (or extroot).
The problem is that to get it working ubi volume has to be attached early during preinit stage.
Current ubi module code search for "ubi" or "data" mtd partition to attach it automatically at boot.
I see two possibilities how it can be done:
- Modify "block" command to add ubi attaching functionality (only as extroot).
- Add "ubi.mtd" parameters to kernel command line (extroot or swapping rootfs_data location).
2nd option is the easiest to implement so I tested it and it works.
The con is that all devices in the apm821xx "nand" profiles gets modified command line when it is only applicable to just one device. Devices that don't have "ecos" partition will get and error message in the kernel log.
Here is an example modification I made:
Can such modification be accepted upstream or option 1 is the only possibility?
Share your thoughts/comments
I'm also interested in using the entire volume of the NAND and I'm very happy to see this post now)
I'm not going to return to the stock firmware. Just want to be able to update OpenWRT to a newer version in the future.
I found another threads:
What can I do right now in order to use the maximum amount of NAND?
I'm not very good at OpenWRT development, but I have enough skills to do something step by step)
Thanks for your response, I was not aware of the topic by @agarg.
If you want use maximum amount of NAND the solution by @thatguyatgithub will be the best for you as it squeeze maximum out of NAND, but with drawback of not being able to go back to stock firmware.
The problem that I would like to solve it that in both solution it is required to make a custom compilation or at least some magic patching of the kernel/dtb.
I would like to came up to a solution that could go upstream so that no magic operation would be required to take advantage of full NAND capacity.
It will be greate to find another solution without patching for many peoples
I will watch for this thread
As for me, I used instruction-solution by chunkeey - patching dtb to make ecos writable and extrooted it.
~84Mb is good enought compare to ~11Mb in ubi partition.
I have not enough knowledge/skills to use another solution right now, I''ll learn)
The wndr4700 is now a little dated machine and does not even have 802.11AC wireless. I doubt anyone flashing this with openwrt will want to go back to antiquated netgear firmware (which appears anyway based on the old versions of openwrt).
Perhaps, it may be ok to create a one way street firmware, if this sounds ok. This is a pretty good hardware and can serve many good purpose considering low power usage.
I use it as a managed switch with samba and mqtt server...