Skip to contentSkip to conversation

u-boot scripts can contain "if" and "loops"?

U-Boot-Users Antonio Di Bacco 2 participants 3 messages Apr 29, 2006

lore
Share & tools
lore
#0 lore raw

Anyone knows how to write an environment variable with a script inside containing if or loops?

Bye,
Antonio.

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

Anyone knows how to write an environment variable with a script inside containing if or loops?

setenv foo 'if imi 40040000 ; then bootm 40040000 ; else dhcp ; bootm ; fi'

Of course this requires that you have the hush shell enabled in your board configuration; see also
http://www.denx.de/wiki/view/DULG/CommandLineParsing

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We have phasers, I vote we blast 'em!
	-- Bailey, "The Corbomite Maneuver", stardate 1514.2
#2 lore raw

Thank you, this u-boot is wonderful!

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

Anyone knows how to write an environment variable with a script inside containing if or loops?

setenv foo 'if imi 40040000 ; then bootm 40040000 ; else dhcp ; bootm ; fi'

Of course this requires that you have the hush shell enabled in your board configuration; see also
http://www.denx.de/wiki/view/DULG/CommandLineParsing

Best regards,

Wolfgang Denk