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

Holger Schurig h.schurig@mn-logistik.de schrieb am 06.11.02 14:24:32:
- only handle config vars that start with CONFIG_
- has only types like int, string, bool, but not bitmask
and CONFIG_COMMANDS is a bitmask. Of course one could put
...
If we want to use lkc for this, we have to transfer files like cmd_elf.c from
#if (CONFIG_COMMANDS & CFG_CMD_ELF)
into
#ifdef CONFIG_CMD_ELF
And include all default commands in every board's set of config definition. 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.
With your configuration system it likely we have to change some semantics here.
Regards Marius.
________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13

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.
participants (2)
-
Holger Schurig
-
Marius Gröger