[Buildroot] [Q] Make kconfig more flexible with selecting options

Peter Korsgaard peter at korsgaard.com
Fri Apr 5 05:19:04 UTC 2019

>>>>> "Vadim" == Vadim Kochan <vadim4j at gmail.com> writes:

 > Hi All!
 > I am almost sure that the idea will be rejected but I will try)

 > I am trying to make external buildroot trees ability to select any
 > config option,
 > even if it is not boolean or tristate.

 > For example, I have external rpi br2 tree which in case of u-boot would
 > select default uboot board name as "rpi_3_32b" (BR2_TARGET_UBOOT_BOARD_DEFCONFIG
 > if it not set already), something like this:

 > ----------------
 > config XXX
 >     default BR2_TARGET_UBOOT_BOARD_DEFCONFIG "rpi_3_32b"
 > -----------------

 > of course to make it possible it needs to extend the kconfig parser,
 > there is one
 > RFC which I think allows to select config option with value other than
 > tristate or boolean:

 >     https://marc.info/?l=linux-kbuild&m=127956469118089&w=2

 > and the linux kernel community rejected this approach ( I did not dig
 > into the implementation in details).

Applying an unmaintained intrusive patch from 2010 is not really a
realistic option. Did you try the alternative proposed in the mailing
list thread?

E.G. add something like this to your overlay:

        default "rpi_3_32b"

Then the u-boot defconfig option should afaik default to that.

But I am not quite sure why you would want to do this in the first place
instead of just providing a defconfig file with the right options set?

Bye, Peter Korsgaard

More information about the buildroot mailing list