Skip to contentSkip to conversation

Copying default environment to NVRAM

U-Boot rory 3 participants 7 messages Feb 19, 2009

lore
Share & tools
lore

rory

author
#0 lore raw

Is there some flag or normal way to get the default environment that is in RAM to get written to NVRAM? I'm currently going to put a routine in our preboot code to do so, but was wondering if there was an officially sanctioned "right" way to do this. I've looked thru code and FAQ's and the best I can find is to run "saveenv" from the CLI, but that's not really a good solution.

thx

#1 lore raw

Dear rory,

Quoted 6 lines · In message <[email protected]> you wrote:

Is there some flag or normal way to get the default environment that is in RAM to get written to NVRAM? I'm currently going to put a routine in our preboot code to do so, but was wondering if there was an officially sanctioned "right" way to do this. I've looked thru code and FAQ's and the best I can find is to run "saveenv" from the CLI, but that's not really a good solution.

Why not? What's wrong with a simple command? I'm not sure what you are looking for?

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Making files is easy under  the  UNIX  operating  system.  Therefore,
users  tend  to  create  numerous  files  using large amounts of file
space. It has been said that the only standard thing about  all  UNIX
systems  is  the  message-of-the-day  telling users to clean up their
files.                             - System V.2 administrator's guide
author
#2 lore raw

It needs to happen automagically, w/o typing anything. I was wondering (I couldn't find anything) if there was some flag that I could set to make it happen, rather than modify my boot process to automagically do it for me.

Quoted 20 lines · Wolfgang Denk

Dear rory,

Quoted 7 lines · In message <[email protected]> you wrote:

Is there some flag or normal way to get the default environment that is in RAM to get written to NVRAM? I'm currently going to put a routine in our preboot code to do so, but was wondering if there was an officially sanctioned "right" way to do this. I've looked thru code and FAQ's and the best I can find is to run "saveenv" from the CLI, but that's not really a good solution.

Why not? What's wrong with a simple command? I'm not sure what you are looking for?

Best regards,

Wolfgang Denk

#3 lore raw

Dear rory,

Quoted 1 line · In message <[email protected]> you wrote:

It needs to happen automagically, w/o typing anything. I was wondering

Well, than run it automatically, without any typing.

U-Boot is extremely flexible and easily supports such operations, too.

Quoted 3 lines

(I couldn't find anything) if there was some flag that I could set to make it happen, rather than modify my boot process to automagically do it for me.

That's an oxymoron. Above you request: "It needs to happen automagi- cally", and now you claim you do NOT want to modify the boot sequence "to automagically do it". What exactly is it what you want?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Don't try to outweird me, three-eyes. I get stranger things than you
free with my breakfast cereal."
           - Zaphod Beeblebrox in  "Hitchhiker's Guide to the Galaxy"
author
#4 lore raw

I can add this operation to my boot command or to my preboot. However, if there is a supported, suggested way to do this, via a #define or compile flag, I would like to know because I would rather do it that way than put in a "hack".

thx

Quoted 26 lines · Wolfgang Denk

Dear rory,

Quoted 2 lines · In message <[email protected]> you wrote:

It needs to happen automagically, w/o typing anything. I was wondering

Well, than run it automatically, without any typing.

U-Boot is extremely flexible and easily supports such operations, too.

Quoted 4 lines

(I couldn't find anything) if there was some flag that I could set to make it happen, rather than modify my boot process to automagically do it for me.

That's an oxymoron. Above you request: "It needs to happen automagi- cally", and now you claim you do NOT want to modify the boot sequence "to automagically do it". What exactly is it what you want?

Best regards,

Wolfgang Denk

#5 lore raw

Dear rory,

Quoted 4 lines · In message <[email protected]> you wrote:

I can add this operation to my boot command or to my preboot. However, if there is a supported, suggested way to do this, via a #define or compile flag, I would like to know because I would rather do it that way than put in a "hack".

Adding this (probably even as a self-deleting) commnd to preboot is in no way a hack. It's a perfectly legal use of a well-documented standard interface.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There's an old proverb that says just about whatever you want it to.
#6 lore raw

Thanks. That's what I wanted to know.

Quoted 19 lines · Wolfgang Denk

Dear rory,

Quoted 5 lines · In message <[email protected]> you wrote:

I can add this operation to my boot command or to my preboot. However, if there is a supported, suggested way to do this, via a #define or compile flag, I would like to know because I would rather do it that way than put in a "hack".

Adding this (probably even as a self-deleting) commnd to preboot is in no way a hack. It's a perfectly legal use of a well-documented standard interface.

Best regards,

Wolfgang Denk