(hoping this is the right list for this.)

i have a Kconfig file with the following choice construct:

==========
choice
        prompt "Microcode patch selection"
        default NO_UCODE_PATCH

config NO_UCODE_PATCH
        bool "None"

config USB_SOF_PATCH
        bool "USB SOF patch"

config I2C_SPI_PATCH
        bool "I2C/SPI relocation patch"

config I2C_SPI_SMC1_PATCH
        bool "I2C/SPI/SMC1 relocation patch"

endchoice
==========

obviously, this represents a set of choices, as well as a "none of the above" choice. however, i want to add one more variable, call it "UCODE_PATCH", that will reflect that *some* patch was selected, without caring which one. (this clearly won't be a displayed choice -- it's a "hidden" config variable that's calculated based on the value of other variables. is there an official name for something like that?)

  the obvious solution is to add the directive:

==========
config UCODE_PATCH
        bool
        default y
        depends on !NO_UCODE_PATCH
==========

but *where* should that be added? (side note: is that the obvious way to do this?)

if i add the above *after* the choice menu, things work fine, but i don't like the fact that this variable exists outside the "choice" construct. philosophically, since it's related to the values inside the choice, i decide to move it inside (after the last selectable config value) to see what happens.

  when i then do the make, i get:

make ARCH=ppc menuconfig
scripts/kconfig/mconf arch/ppc/Kconfig
arch/ppc/8xx_io/Kconfig:159:warning: choice value must have a prompt
arch/ppc/8xx_io/Kconfig:161:warning: defaults for choice values not supported


so, clearly, kbuild doesn't care for this but (surprise, surprise) it still appears to work properly.

is there a proper way to place that "calculated" value representing "yes, something non-null was selected" inside the choice construct without getting a kbuild warning? really, that's where it belongs.

  thoughts?

rday




------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to