NVRAM firmware update via commandline.

4 posts / 0 new
Last post
Daniel Yount
Daniel Yount's picture
NVRAM firmware update via commandline.

 Just looking through the /router/shared/broadcom.c code and nvram code, it talks about a do_nvramul_cgi(char *url, FILE *stream)and a call to nvramul.cgi in the default broadcom web pages, Does a binary exist, that is to be nvramul.cgi , do I need to compile it, do I need to make this function into a binary program?

 

Subhra
Subhra's picture
Please mention the router

Please mention the router model you are using and the flavour of firmware you are concerned about.

And I am not able to understand clearly what is your requirement. It will be helpful if you please elaborate on your requirement.

Daniel Yount
Daniel Yount's picture
Subhra said: Please mention

Subhra said: Please mention the router model you are using and the flavour of firmware you are concerned about. And I am not able to understand clearly what is your requirement. It will be helpful if you please elaborate on your requirement.

Its a Netgear n600 3400v2 I saw a broadcom.c file with a do_nvramul() function that might be able to be used in a cgi. but Still getting my footing on how this is all setup. the nvram utility that comes with the default source code seems limited to setting and getting variables and not firmware.

I have the busybox web server working. Would be nice to have a firmware upload option for changing simple conf files. I have serial access but have to get the router and set it up next to me.

sgparry
sgparry's picture
Netgear routers have a

Netgear routers have a command line program called "write" that copies binary data from a file to the nvram for firmware upgrades and such like.

The source code for these commands is available somewhere in the GPL bundle you have already downloaded. BUT BEWARE the source code in the netgear bundles is highly misleading. For example, on my router the very broadcom.c file you are looking at is out of date - the actual binary is precompiled from a later version of the code. They do not correspond; there is no nvramul.cgi anymore - it has been replaced.