You are here: DENX Home »  U-Boot » Tasks » TaskHandleVarsLikeCommands

Handle environment variables like commands

At the moment, the "run" command has to be used to execute the content of an environment variable as a command sequence.

It is suggested that this behaviour is changed such, that the command interpreter always checks for each command if an environment variable of this name exists. If this is the case, then the content of the variable shall be executed.

That means that all U-Boot commands can be redefined by just defining an environment variable with that name.

To be able to execute the built-in commands if needed even when they are redefined, a new "builtin" command shall be provided that operates similar to the "builtin" command in "bash": the command "builtin foo" will always execute the code of the compiled-in "foo" command, no matter if it has been redefined in a "foo" environment variable or not.

Being worked on by:

Stefano Babic:

-- Main.WolfgangDenk - 15 Oct 2008
Copyright © 2002-2022 by DENX Software Engineering GmbH ImprintTerms & ConditionsPrivacyFeedback
This website is using cookies. More info. That's Fine