Skip to contentSkip to conversation

Editing u-boot parameters from Linux using MTD

U-Boot-Users Jeff Angielski 3 participants 5 messages Feb 6, 2004

lore
Share & tools
lore
#0 lore raw

Has anybody converted the environment code from u-boot into a Linux application that can change the u-boot parameters through the MTD layer?

I am just trying to save some time by not duplicating previous efforts.

Jeff Angielski
The PTR Group

#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

Has anybody converted the environment code from u-boot into a Linux application that can change the u-boot parameters through the MTD layer?

Yes. And you hold the tools right in your hand.

See tools/env/README

Quoted 1 line

I am just trying to save some time by not duplicating previous efforts.

RTFM helps :-)

Best regards,

Wolfgang Denk

Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Always borrow money from a pessimist; they don't expect  to  be  paid
back.
#2 lore raw

Wolfgang

Quoted 8 lines
Quoted 3 lines

Has anybody converted the environment code from u-boot into a Linux application that can change the u-boot parameters through the MTD layer?

Yes. And you hold the tools right in your hand.

See tools/env/README

It seems to offer read access only - is anyone working on changing the variables / adding new ones from linux?

-Cam

#3 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 4 lines

Has anybody converted the environment code from u-boot into a Linux application that can change the u-boot parameters through the MTD layer?

Quoted 6 lines
Quoted 3 lines

Yes. And you hold the tools right in your hand.

See tools/env/README

It seems to offer read access only - is anyone working on changing the variables / adding new ones from linux?

What makes you think it does not include write access?

Did you actually look at the code? it reads:

...
* Command line user interface to firmware (=U-Boot) environment. *
* Implements:
* fw_printenv [ name ... ]
* - prints the values of the environment variables
* "name", or the whole environment if no names are
* specified
* fw_setenv name [ value ... ]
* - If a name without any values is given, the variable

 *                with this name is deleted from the environment;
 *                otherwise, all "value" arguments are concatenated,
 *                separated by sinlge blank characters, and the
 *                resulting string is assigned to the environment
 *                variable "name"

...

Guess what "fw_setenv" is doing?

Best regards,

Wolfgang Denk

Signature · 5 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
                                                          - Doug Gwyn
#4 lore raw

Wolfgang

Quoted 4 lines
Quoted 2 lines

It seems to offer read access only - is anyone working on changing the variables / adding new ones from linux?

Guess what "fw_setenv" is doing?

I skim read that before compiling it and finding only 'fw_printenv', My bad.

-Cam