Closed shantanugoel closed 12 years ago
Moving settings from nvram to jffs would be a major design change, as nvram access routines are hardcoded all over the firmware. The best that could be done is to take advantage of jffs or USB for any additional tool not already integrated in the firmware - and even then it would be tricky since the webui's embedded JS engine only has support for nvram-related queries.
Eric, I had thoughts on this like we could store the actual settings in jffs and keep a path/pointer to the them in nvram (or maybe hardcoded). e.g. for ssh keys, it takes up significant space in nvram, we could designate a file in jffs and make a note in webui that for adding keys, jffs needs to be enabled. The file path could be hard coded in code or we could keep a variable in nvram for the same. For writing to jffs, we could utilize the engine that executes system commands in one of the pages (haven't digged into it yet). This is just an example.
nvram isn't a filesystem, it's a special location area, where any access is done through a special API. You can't link data in nvram to somewhere else.
There would also be no way for web pages to read entries stored in jffs for fill input entries on the displayed web pages. This would require implementing a whole series of new functions in the embedded js engine.
The real solution will be for Asus to fix the CFE to properly allocated the intended 64 KB. Their engineers have been made aware of the issue, now we have to wait to see what they'll do about it.
Yeah, I didn't mean the data in nvram to link literally to the stuff in jffs. Just that it can contain paths to config files for bigger configurations in jffs instead of configurations themselves. :) I agree that the proper fix would be the CFE fix from asus. Let's see if/when they get something done.
Asus has already announced they would fix the nvram issue in a future firmware release. Marking this as "wontfix" for now.
Explore and implement the idea of moving somethings from nvram to jffs to save space in the limited nvram on this router. Just like we have a way to backup router config, we can back up the jffs partition as well. Oleg's firmware (which utilizes flashfs for storing custom scripts, some configurations like ssh etc, and other things) does this as well. So, we can backup the jffs partition contents from web interface, upgrade the firmware and then restore the jffs partition contents.