Skip to main content.

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: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48466

-- WolfgangDenk - 15 Oct 2008