Posted: Mon Nov 19, 2012 9:07 Post subject: Help with changing nvram defaults
I use many asus wl-520gu for hotspot purposes in on site deployment. Thats cheap APs with BR5354 which can do trunking vlans which is critical to me. So everything is pretty good - it runs my pretty complex config more or less flawlessly, but has one nasty problem - random resets to default.
As internet suggests it's hardware fault tied to not so good on board capacitors tien to power supply of a router, that means that i can solve this problem by software and replacing all already instaled APs is not an option.
So, only way i figured to work around is to change nvram defaults of a firmware to my config. And for that i need to recompile firmware from scratch.
I, myself, has pretty scarce knowledge of linux development, so having only svn snapshot and toolchain will take me a long time to figure out how to compile working firmware. Only thig i'va accomplished on that is compiling modified udhcpc which was injected with firmware-mod-kit, but that was nearly a year ago, so much of it already forgotten. So you can more or less imagine my level of skill/understanding.
Now for question part. Is somebody willing to help me by compiling firmware with nvram config and udhcpc mod supplied by me? And i will be extremely thankfull if somebody will help me to install building enviorement for later use. As a matter of community thankfullness i promice that will make a small tutorial for peoples like me.
PS. There is some articles on compilin firmware, but they all look pretty outdated/writen for more edukaded readers.
And i use build 14929.
Well, so far I was able to create some kind of build environment. As far as I can understand make logs compiling finish successfully, but make fails on install stage with some missing switch drivers. May be somebody can give some insight on the problem?
I am using toolchain from ftp, specifically
my compilation scripts:
First one just to automate process a bit
Second one based on recommendations from different sources install_brcm5354.sh
rm -rf mipsel-uclibc/install
Issue with missing switch drivers was overcomed. Solution was to issue.
After that everything finaly compiles successfully. New issue was squashfs packer failing. And so i decided to leave a way of full recompiling, because i already have everything i need. In directory /YourTrunkDir/src/router/mipsel-uclibc/target there is newly compiled but unpacked file system of a firmware. I grab firmware-mod-kit and replaced /etc/defaults.bin with the one i made and voila, there is my router with my modified defaults. One thing you should be aware of is that even if defaults.bin contain plaintext default values, there is more invisible charaters and, i think, after compilation there is data about value length so changing it often breaks that settings. So you need to recompile that part every time.
Last problem i need to solve is how i can disable forsed username/password change after factory reset. I already tried changing default password and changind is_default constant to 0. No luck. I assume there is some constant added to nvram when you set password, but i cant check it because there is no way to log into router before password setup. Reading sources will take long time so may be some body knows how it works and how i can overcome it?