[U-Boot-Users] Scripting Doubt

Wolfgang Denk wd at denx.de
Wed Aug 23 21:33:34 CEST 2006


In message <b92b327b0608230906w2943e462w8c23a82fb8763e51 at mail.gmail.com> you wrote:
> 
> I have an elementary doubt regarding u-boot scripts. I will explain
> this by taking an example. Let the script be
> setenv my_script setenv a 5 \; setenv b 5 \;

This is not a script. It is just a command you enter to  the  command
interpreter.

> On the u-boot prompt, I can run this script as "run my_script". Is it

You don't run a script. You execute the content of an environment
variable.

Please don't say I'm nitpicking here. It is extremely important to
understand the differences, so please use exact terms!

> possible to save this script in some way in the uboot image itself, so
> that when I download uboot, I have this variable set in the
> environment. Basically I am looking for some kind of compile time
> support, the way it happens for bootcmd. I went through the
> documentation, but it only talked about running scripts by downloading
> a text-file after u-boot is up. I am looking for some kind of compile
> time support.

This is because your confusion of terms. You are dealing with
(default) environment variables. You have to look up  environment
variable definitions in the documentation, especially in the README.
See for example CONFIG_EXTRA_ENV_SETTINGS

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
On the subject of C program indentation: "In My Egotistical  Opinion,
most  people's  C  programs  should be indented six feet downward and
covered with dirt."                               - Blair P. Houghton




More information about the U-Boot mailing list