Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What are the differences in dependencies between select and depends on in the kernels Kconfig files?

config FB_CIRRUS
tristate "Cirrus Logic support"
depends on FB && (ZORRO || PCI)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
---help---
This enables support for Cirrus Logic GD542x/543x based boards on
Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.

In the example above, how is FB_CIRRUS diffrently related to FB && (ZORRO || PCI) than it is to FB_CFB_FILLRECT, FB_CFB_COPYAREA and FB_CFB_IMAGEBLIT?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

depends on indicates the symbol(s) must already be positively selected (=y) in order for this option to be configured. For example, depends on FB && (ZORRO || PCI) means FB must have been selected, and (&&) either ZORRO or (||) PCI. For things like make menuconfig, this determines whether or not an option will be presented.

select positively sets a symbol. For example, select FB_CFB_FILLRECT will mean FB_CFB_FILLRECT=y. This fulfills a potential dependency of some other config option(s). Note that the kernel docs discourage the use of this for "visible" symbols (which can be selected/deselected by the user) or for symbols that themselves have dependencies, since those will not be checked.

Reference: https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt

share|improve this answer

depends means that the option only shows up in the menu if its prerequisites (the boolean construct behind it) are met.

select means that, when the user selects this option, the option given as argument to select will be auto-selected.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.