[U-Boot-Users] [PATCH] lkc support for U-Boot

Holger Schurig h.schurig at mn-logistik.de
Wed Nov 6 15:48:29 CET 2002

> And include all default commands in every board's
> set of config definition.

Not necessily. I can think of two different ways on how to do this:

For example, it can be in the central config.in:

config CMD_SAVES
  bool "saves (save R-Record file over serial line)"
  default y if ARCH_MIP405
  default y if ARCH_PIP405
config CMD_DIAG
  bool "diag (perform board diagnostics)"
  default y if ARCH_LWMON
  depends CONFIG_POST

If the .config file does not contain CONFIG_SAVES at all (neither defined nor 
the special "# CONFIG_SAVES is not defined" then the value get's defined if 
also ARCH_MIP405 or ARCH_PIP405 are set. Otherwise not.

That is: a .config file overwrites the "default ... if ..." lines. But if no 
.config exists (or no entry in the .config file), then the "default ... if 
..." lines switches the entry on.

We can even use the .config-overrules-it-all approach further. Say, the 
config.in file contains only this:

config CMD_SAVES
  bool "saves (save R-Record file over serial line)"
config CMD_DIAG
  bool "diag (perform board diagnostics)"
  depends CONFIG_POST

And suppose we have for every board using the new config scheme a 
boards/*/def-config file. Then this file could get copied to .config at "make 
config_<boardname>" time.

> The handy thing about the COMMANDS
> bitmask was that it made it easy to use the default
> set of commands. You only had to specify special/exotic
> commands _on top_ of that.

Both schemes above would fullfill the same goal.

MN-Logistik GmbH         http://www.mn-logistik.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: 06003/9141-0        Fax: 06003/9141-49

More information about the U-Boot mailing list