
In message 406A31B117F2734987636D6CCC93EE3C017BA168@ehost011-3.exch011.intermedia.net you wrote:
There is actually an approach in place, virtually converting single u-boot command into root of command tree. See for example how "nand" command (or shall I say "nand" tree?) is implemented. Wolfgang, do you approve this way of doing or it had sneaked into u-boot "illegally"?
It is perfectly OK where logical groups of commands exist where one command makes no sense without the other(s).
- Strictly hierarchical "CISCO-like" CLI instead of "flat" u-boot
scheme. There are several existing implementations of such CLI which can be used.
The CLI is not a problem here. We are talking about how to enable certain features or feature sets, or disable them.
- Further advance of "bash"-like shell (hush is used in u-boot right
Again, this has nothing to do with the current topic (although it is a perfectly legal qustion in itself).
now). Existing shell lacks many features one is used to see in Linux/Unix shells. It's highly questionable though whether it makes sense to add u-boot specific commands in there, making u-boot shell scripts incompatible with Linux ones.
You are off track. Adding commands is trivial. Just do it. The problem is how toadd commands in a way that they are not compiled at all when not explicitely selected in the board configuration.
Best regards,
Wolfgang Denk