howto use nvram

13 views
Skip to first unread message

cyberstorm

unread,
Mar 12, 2007, 9:51:27 AM3/12/07
to neptune354-dev
Nvram is a persistent memory area where are stored user settings and
other infos. Variable values are stored as text strings.
You can interact with nvram from shell and from c files.

>From shell:
nvram show
list all the content of nvram.
nvram get var_name
Prints the value of var_name.
nvram set var_name=var_value
sets to var_value the variable var_name.
nvram commit
used to save all the changes done with nvram set, otherwise no changes
to nvram are applied.

>From c files:
include the bcmnvram.h file. Look at it (include/bcmnvram.h) to
understand how to use the functions, it is well documented. Again,
remember to "commit" to save changes...

That's all for today

marco

Rail Aliev

unread,
Mar 12, 2007, 10:19:33 AM3/12/07
to neptune...@googlegroups.com
2007/3/12, cyberstorm <marc...@gmail.com> wrotes:

>
> Nvram is a persistent memory area where are stored user settings and
> other infos. Variable values are stored as text strings.

Somewhere in router/rc I saw something like nvram2file. Do you know if
it suitable for binary data?

Marco Vedovati

unread,
Mar 12, 2007, 1:59:38 PM3/12/07
to neptune...@googlegroups.com

Il giorno 12/mar/07, alle ore 15:19, Rail Aliev ha scritto:

>
> Somewhere in router/rc I saw something like nvram2file. Do you know if
> it suitable for binary data?

no, I saw it too, but I never checked what is about.

Reply all
Reply to author
Forward
0 new messages