Discussion:
[Ltib] u-boot Default Environment Variables Location
Todd Sampson
2012-08-22 13:16:12 UTC
Permalink
Each time I configure a target, I have to go into u-boot and use 'setenv'
to change some environment variables.

Where are the default environment variables for u-boot stored in the LTIB
world? I want to edit these so each time I flash a target, the u-boot
environment variables are correct.

Thanks!
Mike Goins
2012-08-22 13:33:58 UTC
Permalink
Each time I configure a target, I have to go into u-boot and use 'setenv' to
change some environment variables.
Where are the default environment variables for u-boot stored in the LTIB
world? I want to edit these so each time I flash a target, the u-boot
environment variables are correct.
The uboot parameters are stored in flash on your target.
You want printenv and savenv:
http://www.denx.de/wiki/DULG/UBootCmdGroupEnvironment
Thanks!
Douglas Peterson
2012-08-23 17:26:54 UTC
Permalink
In your board-specific configs header file (include/configs/your-header.h) you will have a section something like this:


/*
* Environment Configuration
*/

#define CONFIG_ENV_OVERWRITE

#define CONFIG_BAUDRATE 115200

#define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */

#define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */
#undef CONFIG_BOOTARGS /* the boot command will set bootargs */

#define CONFIG_EXTRA_ENV_SETTINGS \
"autoload=n\0" \
"consoledev=ttyS0\0" \
""
#define CONFIG_BOOTCOMMAND "run ramboot"



Some of the commands are set with CONFIG_XXX macros (e.g. CONFIG_BOOTCOMMAND), the rest go in CONFIG_EXTRA_ENV_SETTINGS.

Douglas Peterson




-----Original Message-----
From: ltib-bounces+douglas.peterson=***@nongnu.org [mailto:ltib-bounces+douglas.peterson=***@nongnu.org] On Behalf Of Mike Goins
Sent: Wednesday, August 22, 2012 6:34 AM
To: ltib
Cc: Todd Sampson
Subject: Re: [Ltib] u-boot Default Environment Variables Location
Each time I configure a target, I have to go into u-boot and use 'setenv' to
change some environment variables.
Where are the default environment variables for u-boot stored in the LTIB
world? I want to edit these so each time I flash a target, the u-boot
environment variables are correct.
The uboot parameters are stored in flash on your target.
You want printenv and savenv:
http://www.denx.de/wiki/DULG/UBootCmdGroupEnvironment
Thanks!
_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
***@nongnu.org
https://lists.nongnu.org/mailman/listinfo/ltib
Todd Sampson
2012-08-23 19:35:23 UTC
Permalink
Perfect. It's working. Now I can Flash and ship with no extra typing.

Thanks all for your kind help.
Todd
Post by Douglas Peterson
In your board-specific configs header file (include/configs/your-header.h)
/*
* Environment Configuration
*/
#define CONFIG_ENV_OVERWRITE
#define CONFIG_BAUDRATE 115200
#define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
#define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */
#undef CONFIG_BOOTARGS /* the boot command will set bootargs */
#define CONFIG_EXTRA_ENV_SETTINGS \
"autoload=n\0"
\
"consoledev=ttyS0\0" \
""
#define CONFIG_BOOTCOMMAND "run ramboot"
Some of the commands are set with CONFIG_XXX macros (e.g.
CONFIG_BOOTCOMMAND), the rest go in CONFIG_EXTRA_ENV_SETTINGS.
Douglas Peterson
-----Original Message-----
Sent: Wednesday, August 22, 2012 6:34 AM
To: ltib
Cc: Todd Sampson
Subject: Re: [Ltib] u-boot Default Environment Variables Location
Post by Todd Sampson
Each time I configure a target, I have to go into u-boot and use
'setenv' to
Post by Todd Sampson
change some environment variables.
Where are the default environment variables for u-boot stored in the LTIB
world? I want to edit these so each time I flash a target, the u-boot
environment variables are correct.
The uboot parameters are stored in flash on your target.
http://www.denx.de/wiki/DULG/UBootCmdGroupEnvironment
Post by Todd Sampson
Thanks!
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
https://lists.nongnu.org/mailman/listinfo/ltib
Stuart Hughes
2012-08-22 13:34:05 UTC
Permalink
Hi Todd,

It's not an LTIB thing. U-boot stores it's defaults within the compiled
code (there are per config). These get used the first time, if there's
not saved environment.

It you do a setenv and want to make this permanent, you need to run the
command saveenv. This writes the new config to Flash.

Regards, Stuart
Post by Todd Sampson
Each time I configure a target, I have to go into u-boot and use
'setenv' to change some environment variables.
Where are the default environment variables for u-boot stored in the
LTIB world? I want to edit these so each time I flash a target, the
u-boot environment variables are correct.
Thanks!
Loading...