[U-Boot] Incomplete type declarations in arch/Kconfig (U-Boot-2014.10)

Guilhem Malichier gm at eco-counter.com
Tue Dec 2 08:03:24 CET 2014


Hi,

I'm quite new to U-Boot as well as to the whole Kconfig system, so this may be a dumb question, in which case please forgive my ignorance.

I noticed that the type declarations of several items in the file arch/Kconfig are actually incomplete, lacking the "prompt" parameter:

config SYS_ARCH
     string
     help
          (...)
config SYS_CPU
     string
     help
          (...)
etc. (same for SYS_SOC, SYS_VENDOR, SYS_BOARD and SYS_CONFIG_NAME)
If I'm not mistaken, the string type declaration in Kconfig is supposed to look like either of the following:

string "something"
or

string

prompt "something"


In this case, again if I'm not mistaken, these incomplete declarations seem to prevent the items from being "created" at this step, thus preventing any possibility of overriding the default values directly in a _defconfig file.
So my question is: is this intentional (in which case I would probably recommend using comments for that purpose instead of incomplete declarations)? Or is this a bug (in which case I would be happy to submit a fix simply adding the prompt strings)?


Here is a bit of context if need be: I'm trying to find a way to compile a variant of U-Boot for an existing board (basically just overriding a few lines in <board>.h), but I would like to do it without _modifying_ any file in the U-Boot distribution, nor fiddling with .config, but rather by only adding files (namely configs/<myvariant>_defconfig, and configs/<board-myvariant>.h), so that there will be nothing to merge to support later U-Boot versions.
I've been struggling with this today, assuming that overriding CONFIG_SYS_CONFIG_NAME in my _defconfig would be enough (as it is for CONFIG_SYS_EXTRA_OPTIONS)... but I couldn't get it to work, as only the default value got from arch/<arch>/<board>/Kconfig was used, and I couldn't find any way to add my configuration without actually modifying something in U-Boot's core (either some Kconfig files, or the original <board>.h) or manually editing the generated .config.

This was until I noticed that type declaration problem. As soon as I added the prompt parameters, I was able to successfully build a .config with the desired CONFIG_SYS values, and then compile everything as expected.
Hence the aforementioned question...


Thanks a lot for reading, and congratulations for all the work on Das U-Boot... This is a really amazing system.

                GMal



More information about the U-Boot mailing list