sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget+/translations/zh_CN/kbuild/kconfig-languagemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/kbuild/kconfig-languagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/kbuild/kconfig-languagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/kbuild/kconfig-languagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/kbuild/kconfig-languagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/kbuild/kconfig-languagemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hKconfig Languageh]hKconfig Language}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/kbuild/kconfig-language.rsthKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hcThe configuration database is a collection of configuration options organized in a tree structure::h]hbThe configuration database is a collection of configuration options organized in a tree structure:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh literal_block)}(hXe+- Code maturity level options | +- Prompt for development and/or incomplete code/drivers +- General setup | +- Networking support | +- System V IPC | +- BSD Process Accounting | +- Sysctl support +- Loadable module support | +- Enable loadable module support | +- Set version information on all module symbols | +- Kernel module loader +- ...h]hXe+- Code maturity level options | +- Prompt for development and/or incomplete code/drivers +- General setup | +- Networking support | +- System V IPC | +- BSD Process Accounting | +- Sysctl support +- Loadable module support | +- Enable loadable module support | +- Set version information on all module symbols | +- Kernel module loader +- ...}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhK hhhhubh)}(hEvery entry has its own dependencies. These dependencies are used to determine the visibility of an entry. Any child entry is only visible if its parent entry is also visible.h]hEvery entry has its own dependencies. These dependencies are used to determine the visibility of an entry. Any child entry is only visible if its parent entry is also visible.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Menu entriesh]h Menu entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hMost entries define a config option; all other entries help to organize them. A single configuration option is defined like this::h]hMost entries define a config option; all other entries help to organize them. A single configuration option is defined like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hconfig MODVERSIONS bool "Set version information on all module symbols" depends on MODULES help Usually, modules have to be recompiled whenever you switch to a new kernel. ...h]hconfig MODVERSIONS bool "Set version information on all module symbols" depends on MODULES help Usually, modules have to be recompiled whenever you switch to a new kernel. ...}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhK"hjhhubh)}(hXEvery line starts with a key word and can be followed by multiple arguments. "config" starts a new config entry. The following lines define attributes for this config option. Attributes can be the type of the config option, input prompt, dependencies, help text and default values. A config option can be defined multiple times with the same name, but every definition can have only a single input prompt and the type must not conflict.h]hXEvery line starts with a key word and can be followed by multiple arguments. “config” starts a new config entry. The following lines define attributes for this config option. Attributes can be the type of the config option, input prompt, dependencies, help text and default values. A config option can be defined multiple times with the same name, but every definition can have only a single input prompt and the type must not conflict.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubeh}(h] menu-entriesah ]h"] menu entriesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hMenu attributesh]hMenu attributes}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhK2ubh)}(heA menu entry can have a number of attributes. Not all of them are applicable everywhere (see syntax).h]heA menu entry can have a number of attributes. Not all of them are applicable everywhere (see syntax).}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjChhubh bullet_list)}(hhh](h list_item)}(hXqtype definition: "bool"/"tristate"/"string"/"hex"/"int" Every config option must have a type. There are only two basic types: tristate and string; the other types are based on these two. The type definition optionally accepts an input prompt, so these two examples are equivalent:: bool "Networking support" and:: bool prompt "Networking support" h](h)}(h7type definition: "bool"/"tristate"/"string"/"hex"/"int"h]hKtype definition: “bool”/”tristate”/”string”/”hex”/”int”}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjiubh)}(hEvery config option must have a type. There are only two basic types: tristate and string; the other types are based on these two. The type definition optionally accepts an input prompt, so these two examples are equivalent::h]hEvery config option must have a type. There are only two basic types: tristate and string; the other types are based on these two. The type definition optionally accepts an input prompt, so these two examples are equivalent:}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjiubh)}(hbool "Networking support"h]hbool "Networking support"}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhK>hjiubh)}(hand::h]hand:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjiubh)}(h bool prompt "Networking support"h]h bool prompt "Networking support"}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKBhjiubeh}(h]h ]h"]h$]h&]uh1jghjdhhhhhNubjh)}(hXinput prompt: "prompt" ["if" ] Every menu entry can have at most one prompt, which is used to display to the user. Optionally dependencies only for this prompt can be added with "if". If a prompt is not present, the config option is a non-visible symbol, meaning its value cannot be directly changed by the user (such as altering the value in ``.config``) and the option will not appear in any config menus. Its value can only be set via "default" and "select" (see below). h](h)}(h-input prompt: "prompt" ["if" ]h]h5input prompt: “prompt” [“if” ]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubh)}(hXEvery menu entry can have at most one prompt, which is used to display to the user. Optionally dependencies only for this prompt can be added with "if". If a prompt is not present, the config option is a non-visible symbol, meaning its value cannot be directly changed by the user (such as altering the value in ``.config``) and the option will not appear in any config menus. Its value can only be set via "default" and "select" (see below).h](hX<Every menu entry can have at most one prompt, which is used to display to the user. Optionally dependencies only for this prompt can be added with “if”. If a prompt is not present, the config option is a non-visible symbol, meaning its value cannot be directly changed by the user (such as altering the value in }(hjhhhNhNubhliteral)}(h ``.config``h]h.config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) and the option will not appear in any config menus. Its value can only be set via “default” and “select” (see below).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjubeh}(h]h ]h"]h$]h&]uh1jghjdhhhhhNubjh)}(hXdefault value: "default" ["if" ] A config option can have any number of default values. If multiple default values are visible, only the first defined one is active. Default values are not limited to the menu entry where they are defined. This means the default can be defined somewhere else or be overridden by an earlier definition. The default value is only assigned to the config symbol if no other value was set by the user (via the input prompt above). If an input prompt is visible the default value is presented to the user and can be overridden by him. Optionally, dependencies only for this default value can be added with "if". h](h)}(h-default value: "default" ["if" ]h]h5default value: “default” [“if” ]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubh)}(hX]A config option can have any number of default values. If multiple default values are visible, only the first defined one is active. Default values are not limited to the menu entry where they are defined. This means the default can be defined somewhere else or be overridden by an earlier definition. The default value is only assigned to the config symbol if no other value was set by the user (via the input prompt above). If an input prompt is visible the default value is presented to the user and can be overridden by him. Optionally, dependencies only for this default value can be added with "if".h]hXaA config option can have any number of default values. If multiple default values are visible, only the first defined one is active. Default values are not limited to the menu entry where they are defined. This means the default can be defined somewhere else or be overridden by an earlier definition. The default value is only assigned to the config symbol if no other value was set by the user (via the input prompt above). If an input prompt is visible the default value is presented to the user and can be overridden by him. Optionally, dependencies only for this default value can be added with “if”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubeh}(h]h ]h"]h$]h&]uh1jghjdhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jbhhhK7hjChhubh block_quote)}(hXThe default value deliberately defaults to 'n' in order to avoid bloating the build. With few exceptions, new config options should not change this. The intent is for "make oldconfig" to add as little as possible to the config from release to release. Note: Things that merit "default y/m" include: a) A new Kconfig option for something that used to always be built should be "default y". b) A new gatekeeping Kconfig option that hides/shows other Kconfig options (but does not generate any code of its own), should be "default y" so people will see those other options. c) Sub-driver behavior or similar options for a driver that is "default n". This allows you to provide sane defaults. d) Hardware or infrastructure that everybody expects, such as CONFIG_NET or CONFIG_BLOCK. These are rare exceptions. h](h)}(hThe default value deliberately defaults to 'n' in order to avoid bloating the build. With few exceptions, new config options should not change this. The intent is for "make oldconfig" to add as little as possible to the config from release to release.h]hXThe default value deliberately defaults to ‘n’ in order to avoid bloating the build. With few exceptions, new config options should not change this. The intent is for “make oldconfig” to add as little as possible to the config from release to release.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj#ubhdefinition_list)}(hhh]hdefinition_list_item)}(hX=Note: Things that merit "default y/m" include: a) A new Kconfig option for something that used to always be built should be "default y". b) A new gatekeeping Kconfig option that hides/shows other Kconfig options (but does not generate any code of its own), should be "default y" so people will see those other options. c) Sub-driver behavior or similar options for a driver that is "default n". This allows you to provide sane defaults. d) Hardware or infrastructure that everybody expects, such as CONFIG_NET or CONFIG_BLOCK. These are rare exceptions. h](hterm)}(hNote:h]hNote:}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j@hhhKphj<ubh definition)}(hhh](h)}(h(Things that merit "default y/m" include:h]h,Things that merit “default y/m” include:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjRubhenumerated_list)}(hhh](jh)}(hWA new Kconfig option for something that used to always be built should be "default y". h]h)}(hVA new Kconfig option for something that used to always be built should be "default y".h]hZA new Kconfig option for something that used to always be built should be “default y”.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjhubah}(h]h ]h"]h$]h&]uh1jghjeubjh)}(hA new gatekeeping Kconfig option that hides/shows other Kconfig options (but does not generate any code of its own), should be "default y" so people will see those other options. h]h)}(hA new gatekeeping Kconfig option that hides/shows other Kconfig options (but does not generate any code of its own), should be "default y" so people will see those other options.h]hA new gatekeeping Kconfig option that hides/shows other Kconfig options (but does not generate any code of its own), should be “default y” so people will see those other options.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jghjeubjh)}(hsSub-driver behavior or similar options for a driver that is "default n". This allows you to provide sane defaults. h]h)}(hrSub-driver behavior or similar options for a driver that is "default n". This allows you to provide sane defaults.h]hvSub-driver behavior or similar options for a driver that is “default n”. This allows you to provide sane defaults.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1jghjeubjh)}(hrHardware or infrastructure that everybody expects, such as CONFIG_NET or CONFIG_BLOCK. These are rare exceptions. h]h)}(hqHardware or infrastructure that everybody expects, such as CONFIG_NET or CONFIG_BLOCK. These are rare exceptions.h]hqHardware or infrastructure that everybody expects, such as CONFIG_NET or CONFIG_BLOCK. These are rare exceptions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jghjeubeh}(h]h ]h"]h$]h&]enumtype loweralphaprefixhsuffix)uh1jchjRubeh}(h]h ]h"]h$]h&]uh1jPhj<ubeh}(h]h ]h"]h$]h&]uh1j:hhhKphj7ubah}(h]h ]h"]h$]h&]uh1j5hj#ubeh}(h]h ]h"]h$]h&]uh1j!hhhK]hjChhubjc)}(hhh](jh)}(htype definition + default value:: "def_bool"/"def_tristate" ["if" ] This is a shorthand notation for a type definition plus a value. Optionally dependencies for this default value can be added with "if". h](h)}(h!type definition + default value::h]h type definition + default value:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubh)}(h."def_bool"/"def_tristate" ["if" ]h]h."def_bool"/"def_tristate" ["if" ]}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKthjubh)}(hThis is a shorthand notation for a type definition plus a value. Optionally dependencies for this default value can be added with "if".h]hThis is a shorthand notation for a type definition plus a value. Optionally dependencies for this default value can be added with “if”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hXdependencies: "depends on" This defines a dependency for this menu entry. If multiple dependencies are defined, they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also accept an "if" expression), so these two examples are equivalent:: bool "foo" if BAR default y if BAR and:: depends on BAR bool "foo" default y h](h)}(h!dependencies: "depends on" h]h%dependencies: “depends on” }(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhj"ubh)}(hXThis defines a dependency for this menu entry. If multiple dependencies are defined, they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also accept an "if" expression), so these two examples are equivalent::h]hX This defines a dependency for this menu entry. If multiple dependencies are defined, they are connected with ‘&&’. Dependencies are applied to all other options within this menu entry (which also accept an “if” expression), so these two examples are equivalent:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hj"ubh)}(h"bool "foo" if BAR default y if BARh]h"bool "foo" if BAR default y if BAR}hjBsbah}(h]h ]h"]h$]h&]hhuh1hhhhKhj"ubh)}(hand::h]hand:}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"ubh)}(h#depends on BAR bool "foo" default yh]h#depends on BAR bool "foo" default y}hj^sbah}(h]h ]h"]h$]h&]hhuh1hhhhKhj"ubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hXreverse dependencies: "select" ["if" ] While normal dependencies reduce the upper limit of a symbol (see below), reverse dependencies can be used to force a lower limit of another symbol. The value of the current menu symbol is used as the minimal value can be set to. If is selected multiple times, the limit is set to the largest selection. Reverse dependencies can only be used with boolean or tristate symbols. Note: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. If "select" is followed by "if" , will be selected by the logical AND of the value of the current menu symbol and . This means, the lower limit can be downgraded due to the presence of "if" . This behavior may seem weird, but we rely on it. (The future of this behavior is undecided.) h](h)}(h5reverse dependencies: "select" ["if" ]h]h=reverse dependencies: “select” [“if” ]}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubh)}(hXWhile normal dependencies reduce the upper limit of a symbol (see below), reverse dependencies can be used to force a lower limit of another symbol. The value of the current menu symbol is used as the minimal value can be set to. If is selected multiple times, the limit is set to the largest selection. Reverse dependencies can only be used with boolean or tristate symbols.h]hXWhile normal dependencies reduce the upper limit of a symbol (see below), reverse dependencies can be used to force a lower limit of another symbol. The value of the current menu symbol is used as the minimal value can be set to. If is selected multiple times, the limit is set to the largest selection. Reverse dependencies can only be used with boolean or tristate symbols.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubj6)}(hhh]j;)}(hXNote: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. If "select" is followed by "if" , will be selected by the logical AND of the value of the current menu symbol and . This means, the lower limit can be downgraded due to the presence of "if" . This behavior may seem weird, but we rely on it. (The future of this behavior is undecided.) h](jA)}(hNote:h]hNote:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@hhhKhjubjQ)}(hhh](h)}(hXselect should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over.h]hXselect should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hX@If "select" is followed by "if" , will be selected by the logical AND of the value of the current menu symbol and . This means, the lower limit can be downgraded due to the presence of "if" . This behavior may seem weird, but we rely on it. (The future of this behavior is undecided.)h]hXLIf “select” is followed by “if” , will be selected by the logical AND of the value of the current menu symbol and . This means, the lower limit can be downgraded due to the presence of “if” . This behavior may seem weird, but we rely on it. (The future of this behavior is undecided.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1j:hhhKhjubah}(h]h ]h"]h$]h&]uh1j5hjrubeh}(h]h ]h"]h$]h&]uh1jghjhhhNhNubjh)}(hXweak reverse dependencies: "imply" ["if" ] This is similar to "select" as it enforces a lower limit on another symbol except that the "implied" symbol's value may still be set to n from a direct dependency or with a visible prompt. Given the following example:: config FOO tristate "foo" imply BAZ config BAZ tristate "baz" depends on BAR The following values are possible: === === ============= ============== FOO BAR BAZ's default choice for BAZ === === ============= ============== n y n N/m/y m y m M/y/n y y y Y/m/n n m n N/m m m m M/n y m m M/n y n * N === === ============= ============== This is useful e.g. with multiple drivers that want to indicate their ability to hook into a secondary subsystem while allowing the user to configure that subsystem out without also having to unset these drivers. Note: If the feature provided by BAZ is highly desirable for FOO, FOO should imply not only BAZ, but also its dependency BAR:: config FOO tristate "foo" imply BAR imply BAZ Note: If "imply" is followed by "if" , the default of will be the logical AND of the value of the current menu symbol and . (The future of this behavior is undecided.) h](h)}(h9weak reverse dependencies: "imply" ["if" ]h]hAweak reverse dependencies: “imply” [“if” ]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThis is similar to "select" as it enforces a lower limit on another symbol except that the "implied" symbol's value may still be set to n from a direct dependency or with a visible prompt.h]hThis is similar to “select” as it enforces a lower limit on another symbol except that the “implied” symbol’s value may still be set to n from a direct dependency or with a visible prompt.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hGiven the following example::h]hGiven the following example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h]config FOO tristate "foo" imply BAZ config BAZ tristate "baz" depends on BARh]h]config FOO tristate "foo" imply BAZ config BAZ tristate "baz" depends on BAR}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhKhjubh)}(h"The following values are possible:h]h"The following values are possible:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj")}(hXl=== === ============= ============== FOO BAR BAZ's default choice for BAZ === === ============= ============== n y n N/m/y m y m M/y/n y y y Y/m/n n m n N/m m m m M/n y m m M/n y n * N === === ============= ============== h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j6hj3ubj7)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j6hj3ubj7)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j6hj3ubj7)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j6hj3ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hFOOh]hFOO}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1jjhjgubjk)}(hhh]h)}(hBARh]hBAR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjgubjk)}(hhh]h)}(h BAZ's defaulth]hBAZ’s default}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjgubjk)}(hhh]h)}(hchoice for BAZh]hchoice for BAZ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjgubeh}(h]h ]h"]h$]h&]uh1jehjbubah}(h]h ]h"]h$]h&]uh1j`hj3ubhtbody)}(hhh](jf)}(hhh](jk)}(hhh]h)}(hnh]hn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hyh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjh]hn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hN/m/yh]hN/m/y}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hmh]hm}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj@ubah}(h]h ]h"]h$]h&]uh1jjhj=ubjk)}(hhh]h)}(hjh]hy}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(h]h ]h"]h$]h&]uh1jjhj=ubjk)}(hhh]h)}(hjEh]hm}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjmubah}(h]h ]h"]h$]h&]uh1jjhj=ubjk)}(hhh]h)}(hM/y/nh]hM/y/n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhj=ubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hY/m/nh]hY/m/n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hjh]hn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjEh]hm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjh]hn}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj1ubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hN/mh]hN/m}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjGubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hjEh]hm}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjgubah}(h]h ]h"]h$]h&]uh1jjhjdubjk)}(hhh]h)}(hjEh]hm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubah}(h]h ]h"]h$]h&]uh1jjhjdubjk)}(hhh]h)}(hjEh]hm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjdubjk)}(hhh]h)}(hM/nh]hM/n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjdubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjEh]hm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hjEh]hm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hM/nh]hM/n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubjf)}(hhh](jk)}(hhh]h)}(hjh]hy}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1jjhj(ubjk)}(hhh]h)}(hjh]hn}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jjhj(ubjk)}(hhh]jc)}(hhh]jh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghjZubah}(h]h ]h"]h$]h&]j*uh1jbhhhKhjWubah}(h]h ]h"]h$]h&]uh1jjhj(ubjk)}(hhh]h)}(hNh]hN}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjsubah}(h]h ]h"]h$]h&]uh1jjhj(ubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]colsKuh1j1hj.ubah}(h]h ]h"]h$]h&]uh1j,hj(ubah}(h]h ]h"]h$]h&]uh1j!hhhKhjubh)}(hThis is useful e.g. with multiple drivers that want to indicate their ability to hook into a secondary subsystem while allowing the user to configure that subsystem out without also having to unset these drivers.h]hThis is useful e.g. with multiple drivers that want to indicate their ability to hook into a secondary subsystem while allowing the user to configure that subsystem out without also having to unset these drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h~Note: If the feature provided by BAZ is highly desirable for FOO, FOO should imply not only BAZ, but also its dependency BAR::h]h}Note: If the feature provided by BAZ is highly desirable for FOO, FOO should imply not only BAZ, but also its dependency BAR:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h9config FOO tristate "foo" imply BAR imply BAZh]h9config FOO tristate "foo" imply BAR imply BAZ}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKhjubh)}(hNote: If "imply" is followed by "if" , the default of will be the logical AND of the value of the current menu symbol and . (The future of this behavior is undecided.)h]hNote: If “imply” is followed by “if” , the default of will be the logical AND of the value of the current menu symbol and . (The future of this behavior is undecided.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hXflimiting menu display: "visible if" This attribute is only applicable to menu blocks, if the condition is false, the menu block is not displayed to the user (the symbols contained there can still be selected by other symbols, though). It is similar to a conditional "prompt" attribute for individual menu entries. Default value of "visible" is true. h](h)}(h*limiting menu display: "visible if" h]h.limiting menu display: “visible if” }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hX9This attribute is only applicable to menu blocks, if the condition is false, the menu block is not displayed to the user (the symbols contained there can still be selected by other symbols, though). It is similar to a conditional "prompt" attribute for individual menu entries. Default value of "visible" is true.h]hXAThis attribute is only applicable to menu blocks, if the condition is false, the menu block is not displayed to the user (the symbols contained there can still be selected by other symbols, though). It is similar to a conditional “prompt” attribute for individual menu entries. Default value of “visible” is true.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hXnumerical ranges: "range" ["if" ] This allows to limit the range of possible input values for int and hex symbols. The user can only input a value which is larger than or equal to the first symbol and smaller than or equal to the second symbol. h](h)}(h9numerical ranges: "range" ["if" ]h]hAnumerical ranges: “range” [“if” ]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hThis allows to limit the range of possible input values for int and hex symbols. The user can only input a value which is larger than or equal to the first symbol and smaller than or equal to the second symbol.h]hThis allows to limit the range of possible input values for int and hex symbols. The user can only input a value which is larger than or equal to the first symbol and smaller than or equal to the second symbol.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hhelp text: "help" This defines a help text. The end of the help text is determined by the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text. h](h)}(hhelp text: "help"h]hhelp text: “help”}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3ubh)}(hThis defines a help text. The end of the help text is determined by the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text.h]hThis defines a help text. The end of the help text is determined by the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3ubeh}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hmodule attribute: "modules" This declares the symbol to be used as the MODULES symbol, which enables the third modular state for all config symbols. At most one symbol may have the "modules" option set. h]h)}(hmodule attribute: "modules" This declares the symbol to be used as the MODULES symbol, which enables the third modular state for all config symbols. At most one symbol may have the "modules" option set.h]hmodule attribute: “modules” This declares the symbol to be used as the MODULES symbol, which enables the third modular state for all config symbols. At most one symbol may have the “modules” option set.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubeh}(h]h ]h"]h$]h&]jj uh1jbhhhKrhjChhubeh}(h]menu-attributesah ]h"]menu attributesah$]h&]uh1hhhhhhhhK2ubh)}(hhh](h)}(hMenu dependenciesh]hMenu dependencies}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXDependencies define the visibility of a menu entry and can also reduce the input range of tristate symbols. The tristate logic used in the expressions uses one more state than normal boolean logic to express the module state. Dependency expressions have the following syntax::h]hXDependencies define the visibility of a menu entry and can also reduce the input range of tristate symbols. The tristate logic used in the expressions uses one more state than normal boolean logic to express the module state. Dependency expressions have the following syntax:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX% ::= (1) '=' (2) '!=' (3) '<' (4) '>' (4) '<=' (4) '>=' (4) '(' ')' (5) '!' (6) '&&' (7) '||' (8)h]hX% ::= (1) '=' (2) '!=' (3) '<' (4) '>' (4) '<=' (4) '>=' (4) '(' ')' (5) '!' (6) '&&' (7) '||' (8)}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKhjhhubh)}(h9Expressions are listed in decreasing order of precedence.h]h9Expressions are listed in decreasing order of precedence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjd)}(hhh](jh)}(hConvert the symbol into an expression. Boolean and tristate symbols are simply converted into the respective expression values. All other symbol types result in 'n'.h]h)}(hConvert the symbol into an expression. Boolean and tristate symbols are simply converted into the respective expression values. All other symbol types result in 'n'.h]hConvert the symbol into an expression. Boolean and tristate symbols are simply converted into the respective expression values. All other symbol types result in ‘n’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hGIf the values of both symbols are equal, it returns 'y', otherwise 'n'.h]h)}(hGIf the values of both symbols are equal, it returns 'y', otherwise 'n'.h]hOIf the values of both symbols are equal, it returns ‘y’, otherwise ‘n’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hGIf the values of both symbols are equal, it returns 'n', otherwise 'y'.h]h)}(hGIf the values of both symbols are equal, it returns 'n', otherwise 'y'.h]hOIf the values of both symbols are equal, it returns ‘n’, otherwise ‘y’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hIf value of is respectively lower, greater, lower-or-equal, or greater-or-equal than value of , it returns 'y', otherwise 'n'.h]h)}(hIf value of is respectively lower, greater, lower-or-equal, or greater-or-equal than value of , it returns 'y', otherwise 'n'.h]hIf value of is respectively lower, greater, lower-or-equal, or greater-or-equal than value of , it returns ‘y’, otherwise ‘n’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(hAReturns the value of the expression. Used to override precedence.h]h)}(hj h]hAReturns the value of the expression. Used to override precedence.}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(h!Returns the result of (2-/expr/).h]h)}(hj6 h]h!Returns the result of (2-/expr/).}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4 ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(h*Returns the result of min(/expr/, /expr/).h]h)}(hjM h]h*Returns the result of min(/expr/, /expr/).}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjK ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(h+Returns the result of max(/expr/, /expr/). h]h)}(h*Returns the result of max(/expr/, /expr/).h]h*Returns the result of max(/expr/, /expr/).}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubeh}(h]h ]h"]h$]h&]jarabicj(jjuh1jchjhhhhhMubh)}(hAn expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations). A menu entry becomes visible when its expression evaluates to 'm' or 'y'.h]hAn expression can have a value of ‘n’, ‘m’ or ‘y’ (or 0, 1, 2 respectively for calculations). A menu entry becomes visible when its expression evaluates to ‘m’ or ‘y’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXThere are two types of symbols: constant and non-constant symbols. Non-constant symbols are the most common ones and are defined with the 'config' statement. Non-constant symbols consist entirely of alphanumeric characters or underscores. Constant symbols are only part of expressions. Constant symbols are always surrounded by single or double quotes. Within the quote, any other character is allowed and the quotes can be escaped using '\'.h]hXThere are two types of symbols: constant and non-constant symbols. Non-constant symbols are the most common ones and are defined with the ‘config’ statement. Non-constant symbols consist entirely of alphanumeric characters or underscores. Constant symbols are only part of expressions. Constant symbols are always surrounded by single or double quotes. Within the quote, any other character is allowed and the quotes can be escaped using ‘'.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]menu-dependenciesah ]h"]menu dependenciesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hMenu structureh]hMenu structure}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hjThe position of a menu entry in the tree is determined in two ways. First it can be specified explicitly::h]hiThe position of a menu entry in the tree is determined in two ways. First it can be specified explicitly:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXmenu "Network device support" depends on NET config NETDEVICES ... endmenuh]hXmenu "Network device support" depends on NET config NETDEVICES ... endmenu}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhM"hj hhubh)}(hXAll entries within the "menu" ... "endmenu" block become a submenu of "Network device support". All subentries inherit the dependencies from the menu entry, e.g. this means the dependency "NET" is added to the dependency list of the config option NETDEVICES.h]hXAll entries within the “menu” ... “endmenu” block become a submenu of “Network device support”. All subentries inherit the dependencies from the menu entry, e.g. this means the dependency “NET” is added to the dependency list of the config option NETDEVICES.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj hhubh)}(hX%The other way to generate the menu structure is done by analyzing the dependencies. If a menu entry somehow depends on the previous entry, it can be made a submenu of it. First, the previous (parent) symbol must be part of the dependency list and then one of these two conditions must be true:h]hX%The other way to generate the menu structure is done by analyzing the dependencies. If a menu entry somehow depends on the previous entry, it can be made a submenu of it. First, the previous (parent) symbol must be part of the dependency list and then one of these two conditions must be true:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj hhubjc)}(hhh](jh)}(hBthe child entry must become invisible, if the parent is set to 'n'h]h)}(hj h]hFthe child entry must become invisible, if the parent is set to ‘n’}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubah}(h]h ]h"]h$]h&]uh1jghj hhhhhNubjh)}(hX(the child entry must only be visible, if the parent is visible:: config MODULES bool "Enable loadable module support" config MODVERSIONS bool "Set version information on all module symbols" depends on MODULES comment "module support disabled" depends on !MODULES h](h)}(h@the child entry must only be visible, if the parent is visible::h]h?the child entry must only be visible, if the parent is visible:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj ubh)}(hconfig MODULES bool "Enable loadable module support" config MODVERSIONS bool "Set version information on all module symbols" depends on MODULES comment "module support disabled" depends on !MODULESh]hconfig MODULES bool "Enable loadable module support" config MODVERSIONS bool "Set version information on all module symbols" depends on MODULES comment "module support disabled" depends on !MODULES}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhM8hj ubeh}(h]h ]h"]h$]h&]uh1jghj hhhhhNubeh}(h]h ]h"]h$]h&]jj uh1jbhhhM5hj hhubh)}(hMODVERSIONS directly depends on MODULES, this means it's only visible if MODULES is different from 'n'. The comment on the other hand is only visible when MODULES is set to 'n'.h]hMODVERSIONS directly depends on MODULES, this means it’s only visible if MODULES is different from ‘n’. The comment on the other hand is only visible when MODULES is set to ‘n’.}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj hhubeh}(h]menu-structureah ]h"]menu structureah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hKconfig syntaxh]hKconfig syntax}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK hhhhhMHubh)}(hThe configuration file describes a series of menu entries, where every line starts with a keyword (except help texts). The following keywords end a menu entry:h]hThe configuration file describes a series of menu entries, where every line starts with a keyword (except help texts). The following keywords end a menu entry:}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjK hhubjc)}(hhh](jh)}(hconfigh]h)}(hjo h]hconfig}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjm ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(h menuconfigh]h)}(hj h]h menuconfig}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(hchoice/endchoiceh]h)}(hj h]hchoice/endchoice}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(hcommenth]h)}(hj h]hcomment}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(h menu/endmenuh]h)}(hj h]h menu/endmenu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(hif/endifh]h)}(hj h]hif/endif}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubjh)}(hsource h]h)}(hsourceh]hsource}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj ubah}(h]h ]h"]h$]h&]uh1jghjj hhhhhNubeh}(h]h ]h"]h$]h&]jj uh1jbhhhMNhjK hhubh)}(h9The first five also start the definition of a menu entry.h]h9The first five also start the definition of a menu entry.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjK hhubh)}(hconfig::h]hconfig:}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjK hhubh)}(h""config" h]h""config" }hj1 sbah}(h]h ]h"]h$]h&]hhuh1hhhhMZhjK hhubh)}(hUThis defines a config symbol and accepts any of above attributes as options.h]hUThis defines a config symbol and accepts any of above attributes as options.}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjK hhubh)}(h menuconfig::h]h menuconfig:}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hjK hhubh)}(h&"menuconfig" h]h&"menuconfig" }hj[ sbah}(h]h ]h"]h$]h&]hhuh1hhhhMbhjK hhubh)}(hXThis is similar to the simple config entry above, but it also gives a hint to front ends, that all suboptions should be displayed as a separate list of options. To make sure all the suboptions will really show up under the menuconfig entry and not outside of it, every item from the list must depend on the menuconfig symbol. In practice, this is achieved by using one of the next two constructs::h]hXThis is similar to the simple config entry above, but it also gives a hint to front ends, that all suboptions should be displayed as a separate list of options. To make sure all the suboptions will really show up under the menuconfig entry and not outside of it, every item from the list must depend on the menuconfig symbol. In practice, this is achieved by using one of the next two constructs:}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjK hhubh)}(h(1): menuconfig M if M config C1 config C2 endif (2): menuconfig M config C1 depends on M config C2 depends on Mh]h(1): menuconfig M if M config C1 config C2 endif (2): menuconfig M config C1 depends on M config C2 depends on M}hjw sbah}(h]h ]h"]h$]h&]hhuh1hhhhMlhjK hhubh)}(hIn the following examples (3) and (4), C1 and C2 still have the M dependency, but will not appear under menuconfig M anymore, because of C0, which doesn't depend on M::h]hIn the following examples (3) and (4), C1 and C2 still have the M dependency, but will not appear under menuconfig M anymore, because of C0, which doesn’t depend on M:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjK hhubh)}(h(3): menuconfig M config C0 if M config C1 config C2 endif (4): menuconfig M config C0 config C1 depends on M config C2 depends on Mh]h(3): menuconfig M config C0 if M config C1 config C2 endif (4): menuconfig M config C0 config C1 depends on M config C2 depends on M}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhM~hjK hhubh)}(h choices::h]hchoices:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h4"choice" "endchoice"h]h4"choice" "endchoice"}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hlThis defines a choice group and accepts "prompt", "default", "depends on", and "help" attributes as options.h]h|This defines a choice group and accepts “prompt”, “default”, “depends on”, and “help” attributes as options.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h:A choice only allows a single config entry to be selected.h]h:A choice only allows a single config entry to be selected.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h comment::h]hcomment:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h$"comment" h]h$"comment" }hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hThis defines a comment which is displayed to the user during the configuration process and is also echoed to the output files. The only possible options are dependencies.h]hThis defines a comment which is displayed to the user during the configuration process and is also echoed to the output files. The only possible options are dependencies.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(hmenu::h]hmenu:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h5"menu" "endmenu"h]h5"menu" "endmenu"}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hThis defines a menu block, see "Menu structure" above for more information. The only possible options are dependencies and "visible" attributes.h]hThis defines a menu block, see “Menu structure” above for more information. The only possible options are dependencies and “visible” attributes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(hif::h]hif:}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h"if" "endif"h]h"if" "endif"}hj; sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hdThis defines an if block. The dependency expression is appended to all enclosed menu entries.h]hdThis defines an if block. The dependency expression is appended to all enclosed menu entries.}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(hsource::h]hsource:}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h"source" h]h"source" }hje sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hHThis reads the specified configuration file. This file is always parsed.h]hHThis reads the specified configuration file. This file is always parsed.}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h mainmenu::h]h mainmenu:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h"mainmenu" h]h"mainmenu" }hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjK hhubh)}(hThis sets the config program's title bar if the config program chooses to use it. It should be placed at the top of the configuration, before any other statement.h]hThis sets the config program’s title bar if the config program chooses to use it. It should be placed at the top of the configuration, before any other statement.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(h '#' Kconfig source file comment:h]h$‘#’ Kconfig source file comment:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubh)}(hAn unquoted '#' character anywhere in a source file line indicates the beginning of a source file comment. The remainder of that line is a comment.h]hAn unquoted ‘#’ character anywhere in a source file line indicates the beginning of a source file comment. The remainder of that line is a comment.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK hhubeh}(h]kconfig-syntaxah ]h"]kconfig syntaxah$]h&]uh1hhhhhhhhMHubh)}(hhh](h)}(h Kconfig hintsh]h Kconfig hints}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThis is a collection of Kconfig tips, most of which aren't obvious at first glance and most of which have become idioms in several Kconfig files.h]hThis is a collection of Kconfig tips, most of which aren’t obvious at first glance and most of which have become idioms in several Kconfig files.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hhh](h)}(h6Adding common features and make the usage configurableh]h6Adding common features and make the usage configurable}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hX9It is a common idiom to implement a feature/functionality that are relevant for some architectures but not all. The recommended way to do so is to use a config variable named HAVE_* that is defined in a common Kconfig file and selected by the relevant architectures. An example is the generic IOMAP functionality.h]hX9It is a common idiom to implement a feature/functionality that are relevant for some architectures but not all. The recommended way to do so is to use a config variable named HAVE_* that is defined in a common Kconfig file and selected by the relevant architectures. An example is the generic IOMAP functionality.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hWe would in lib/Kconfig see::h]hWe would in lib/Kconfig see:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hy# Generic IOMAP is used to ... config HAVE_GENERIC_IOMAP config GENERIC_IOMAP depends on HAVE_GENERIC_IOMAP && FOOh]hy# Generic IOMAP is used to ... config HAVE_GENERIC_IOMAP config GENERIC_IOMAP depends on HAVE_GENERIC_IOMAP && FOO}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubh)}(h"And in lib/Makefile we would see::h]h!And in lib/Makefile we would see:}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h&obj-$(CONFIG_GENERIC_IOMAP) += iomap.oh]h&obj-$(CONFIG_GENERIC_IOMAP) += iomap.o}hj7 sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubh)}(hJFor each architecture using the generic IOMAP functionality we would see::h]hIFor each architecture using the generic IOMAP functionality we would see:}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hLconfig X86 select ... select HAVE_GENERIC_IOMAP select ...h]hLconfig X86 select ... select HAVE_GENERIC_IOMAP select ...}hjS sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubh)}(hnNote: we use the existing config option and avoid creating a new config variable to select HAVE_GENERIC_IOMAP.h]hnNote: we use the existing config option and avoid creating a new config variable to select HAVE_GENERIC_IOMAP.}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX9Note: the use of the internal config variable HAVE_GENERIC_IOMAP, it is introduced to overcome the limitation of select which will force a config option to 'y' no matter the dependencies. The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the situation where select forces a symbol equals to 'y'.h]hXANote: the use of the internal config variable HAVE_GENERIC_IOMAP, it is introduced to overcome the limitation of select which will force a config option to ‘y’ no matter the dependencies. The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the situation where select forces a symbol equals to ‘y’.A}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]6adding-common-features-and-make-the-usage-configurableah ]h"]6adding common features and make the usage configurableah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h*Adding features that need compiler supporth]h*Adding features that need compiler support}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThere are several features that need compiler support. The recommended way to describe the dependency on the compiler feature is to use "depends on" followed by a test macro::h]hThere are several features that need compiler support. The recommended way to describe the dependency on the compiler feature is to use “depends on” followed by a test macro:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hconfig STACKPROTECTOR bool "Stack Protector buffer overflow detection" depends on $(cc-option,-fstack-protector) ...h]hconfig STACKPROTECTOR bool "Stack Protector buffer overflow detection" depends on $(cc-option,-fstack-protector) ...}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubh)}(hIf you need to expose a compiler capability to makefiles and/or C source files, `CC_HAS_` is the recommended prefix for the config option::h](hPIf you need to expose a compiler capability to makefiles and/or C source files, }(hj hhhNhNubhtitle_reference)}(h `CC_HAS_`h]hCC_HAS_}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh1 is the recommended prefix for the config option:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hTconfig CC_HAS_FOO def_bool $(success,$(srctree)/scripts/cc-check-foo.sh $(CC))h]hTconfig CC_HAS_FOO def_bool $(success,$(srctree)/scripts/cc-check-foo.sh $(CC))}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubeh}(h]*adding-features-that-need-compiler-supportah ]h"]*adding features that need compiler supportah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hBuild as module onlyh]hBuild as module only}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM ubh)}(hdTo restrict a component build to module-only, qualify its config symbol with "depends on m". E.g.::h]hgTo restrict a component build to module-only, qualify its config symbol with “depends on m”. E.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj hhubh)}(h$config FOO depends on BAR && mh]h$config FOO depends on BAR && m}hj sbah}(h]h ]h"]h$]h&]hhuh1hhhhMhj hhubh)}(h+limits FOO to module (=m) or disabled (=n).h]h+limits FOO to module (=m) or disabled (=n).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]build-as-module-onlyah ]h"]build as module onlyah$]h&]uh1hhj hhhhhM ubh)}(hhh](h)}(hCompile-testingh]hCompile-testing}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhMubh)}(hX If a config symbol has a dependency, but the code controlled by the config symbol can still be compiled if the dependency is not met, it is encouraged to increase build coverage by adding an "|| COMPILE_TEST" clause to the dependency. This is especially useful for drivers for more exotic hardware, as it allows continuous-integration systems to compile-test the code on a more common system, and detect bugs that way. Note that compile-tested code should avoid crashing when run on a system where the dependency is not met.h]hXIf a config symbol has a dependency, but the code controlled by the config symbol can still be compiled if the dependency is not met, it is encouraged to increase build coverage by adding an “|| COMPILE_TEST” clause to the dependency. This is especially useful for drivers for more exotic hardware, as it allows continuous-integration systems to compile-test the code on a more common system, and detect bugs that way. Note that compile-tested code should avoid crashing when run on a system where the dependency is not met.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubeh}(h]compile-testingah ]h"]compile-testingah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h&Architecture and platform dependenciesh]h&Architecture and platform dependencies}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhMubh)}(hX_Due to the presence of stubs, most drivers can now be compiled on most architectures. However, this does not mean it makes sense to have all drivers available everywhere, as the actual hardware may only exist on specific architectures and platforms. This is especially true for on-SoC IP cores, which may be limited to a specific vendor or SoC family.h]hX_Due to the presence of stubs, most drivers can now be compiled on most architectures. However, this does not mean it makes sense to have all drivers available everywhere, as the actual hardware may only exist on specific architectures and platforms. This is especially true for on-SoC IP cores, which may be limited to a specific vendor or SoC family.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjThhubh)}(hX"To prevent asking the user about drivers that cannot be used on the system(s) the user is compiling a kernel for, and if it makes sense, config symbols controlling the compilation of a driver should contain proper dependencies, limiting the visibility of the symbol to (a superset of) the platform(s) the driver can be used on. The dependency can be an architecture (e.g. ARM) or platform (e.g. ARCH_OMAP4) dependency. This makes life simpler not only for distro config owners, but also for every single developer or user who configures a kernel.h]hX"To prevent asking the user about drivers that cannot be used on the system(s) the user is compiling a kernel for, and if it makes sense, config symbols controlling the compilation of a driver should contain proper dependencies, limiting the visibility of the symbol to (a superset of) the platform(s) the driver can be used on. The dependency can be an architecture (e.g. ARM) or platform (e.g. ARCH_OMAP4) dependency. This makes life simpler not only for distro config owners, but also for every single developer or user who configures a kernel.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjThhubh)}(haSuch a dependency can be relaxed by combining it with the compile-testing rule above, leading to:h]haSuch a dependency can be relaxed by combining it with the compile-testing rule above, leading to:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjThhubj")}(hbconfig FOO bool "Support for foo hardware" depends on ARCH_FOO_VENDOR || COMPILE_TEST h]j6)}(hhh]j;)}(hVconfig FOO bool "Support for foo hardware" depends on ARCH_FOO_VENDOR || COMPILE_TEST h](jA)}(h config FOOh]h config FOO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@hhhM4hjubjQ)}(hhh]h)}(hJbool "Support for foo hardware" depends on ARCH_FOO_VENDOR || COMPILE_TESTh]hNbool “Support for foo hardware” depends on ARCH_FOO_VENDOR || COMPILE_TEST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubah}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1j:hhhM4hjubah}(h]h ]h"]h$]h&]uh1j5hjubah}(h]h ]h"]h$]h&]uh1j!hhhM2hjThhubeh}(h]&architecture-and-platform-dependenciesah ]h"]&architecture and platform dependenciesah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hOptional dependenciesh]hOptional dependencies}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM7ubh)}(hSome drivers are able to optionally use a feature from another module or build cleanly with that module disabled, but cause a link failure when trying to use that loadable module from a built-in driver.h]hSome drivers are able to optionally use a feature from another module or build cleanly with that module disabled, but cause a link failure when trying to use that loadable module from a built-in driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjhhubh)}(hmThe most common way to express this optional dependency in Kconfig logic uses the slightly counterintuitive::h]hlThe most common way to express this optional dependency in Kconfig logic uses the slightly counterintuitive:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjhhubh)}(hQconfig FOO tristate "Support for foo hardware" depends on BAR || !BARh]hQconfig FOO tristate "Support for foo hardware" depends on BAR || !BAR}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhM@hjhhubh)}(hThis means that there is either a dependency on BAR that disallows the combination of FOO=y with BAR=m, or BAR is completely disabled. The BAR module must provide all the stubs for !BAR case.h]hThis means that there is either a dependency on BAR that disallows the combination of FOO=y with BAR=m, or BAR is completely disabled. The BAR module must provide all the stubs for !BAR case.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjhhubh)}(hFor a more formalized approach if there are multiple drivers that have the same dependency, a helper symbol can be used, like::h]h~For a more formalized approach if there are multiple drivers that have the same dependency, a helper symbol can be used, like:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjhhubh)}(hconfig FOO tristate "Support for foo hardware" depends on BAR_OPTIONAL config BAR_OPTIONAL def_tristate BAR || !BARh]hconfig FOO tristate "Support for foo hardware" depends on BAR_OPTIONAL config BAR_OPTIONAL def_tristate BAR || !BAR}hj0sbah}(h]h ]h"]h$]h&]hhuh1hhhhMKhjhhubh)}(hMuch less favorable way to express optional dependency is IS_REACHABLE() within the module code, useful for example when the module BAR does not provide !BAR stubs::h]hMuch less favorable way to express optional dependency is IS_REACHABLE() within the module code, useful for example when the module BAR does not provide !BAR stubs:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjhhubh)}(hdfoo_init() { if (IS_REACHABLE(CONFIG_BAR)) bar_register(&foo); ... }h]hdfoo_init() { if (IS_REACHABLE(CONFIG_BAR)) bar_register(&foo); ... }}hjLsbah}(h]h ]h"]h$]h&]hhuh1hhhhMVhjhhubh)}(hIS_REACHABLE() is generally discouraged, because the code will be silently discarded, when CONFIG_BAR=m and this code is built-in. This is not what users usually expect when enabling BAR as module.h]hIS_REACHABLE() is generally discouraged, because the code will be silently discarded, when CONFIG_BAR=m and this code is built-in. This is not what users usually expect when enabling BAR as module.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubeh}(h]optional-dependenciesah ]h"]optional dependenciesah$]h&]uh1hhj hhhhhM7ubh)}(hhh](h)}(h(Kconfig recursive dependency limitationsh]h(Kconfig recursive dependency limitations}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphhhhhMbubh)}(hXIf you've hit the Kconfig error: "recursive dependency detected" you've run into a recursive dependency issue with Kconfig, a recursive dependency can be summarized as a circular dependency. The kconfig tools need to ensure that Kconfig files comply with specified configuration requirements. In order to do that kconfig must determine the values that are possible for all Kconfig symbols, this is currently not possible if there is a circular relation between two or more Kconfig symbols. For more details refer to the "Simple Kconfig recursive issue" subsection below. Kconfig does not do recursive dependency resolution; this has a few implications for Kconfig file writers. We'll first explain why this issues exists and then provide an example technical limitation which this brings upon Kconfig developers. Eager developers wishing to try to address this limitation should read the next subsections.h]hXIf you’ve hit the Kconfig error: “recursive dependency detected” you’ve run into a recursive dependency issue with Kconfig, a recursive dependency can be summarized as a circular dependency. The kconfig tools need to ensure that Kconfig files comply with specified configuration requirements. In order to do that kconfig must determine the values that are possible for all Kconfig symbols, this is currently not possible if there is a circular relation between two or more Kconfig symbols. For more details refer to the “Simple Kconfig recursive issue” subsection below. Kconfig does not do recursive dependency resolution; this has a few implications for Kconfig file writers. We’ll first explain why this issues exists and then provide an example technical limitation which this brings upon Kconfig developers. Eager developers wishing to try to address this limitation should read the next subsections.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjphhubeh}(h](kconfig-recursive-dependency-limitationsah ]h"](kconfig recursive dependency limitationsah$]h&]uh1hhj hhhhhMbubh)}(hhh](h)}(hSimple Kconfig recursive issueh]hSimple Kconfig recursive issue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMsubh)}(h5Read: Documentation/kbuild/Kconfig.recursion-issue-01h]h5Read: Documentation/kbuild/Kconfig.recursion-issue-01}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjhhubh)}(h Test with::h]h Test with:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(hOmake KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfigh]hOmake KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhMyhjhhubeh}(h]simple-kconfig-recursive-issueah ]h"]simple kconfig recursive issueah$]h&]uh1hhj hhhhhMsubh)}(hhh](h)}(h"Cumulative Kconfig recursive issueh]h"Cumulative Kconfig recursive issue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM|ubh)}(h5Read: Documentation/kbuild/Kconfig.recursion-issue-02h]h5Read: Documentation/kbuild/Kconfig.recursion-issue-02}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(h Test with::h]h Test with:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hOmake KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfigh]hOmake KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjhhubeh}(h]"cumulative-kconfig-recursive-issueah ]h"]"cumulative kconfig recursive issueah$]h&]uh1hhj hhhhhM|ubh)}(hhh](h)}(h.Practical solutions to kconfig recursive issueh]h.Practical solutions to kconfig recursive issue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hDevelopers who run into the recursive Kconfig issue have two options at their disposal. We document them below and also provide a list of historical issues resolved through these different solutions.h]hDevelopers who run into the recursive Kconfig issue have two options at their disposal. We document them below and also provide a list of historical issues resolved through these different solutions.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj")}(ha) Remove any superfluous "select FOO" or "depends on FOO" b) Match dependency semantics: b1) Swap all "select FOO" to "depends on FOO" or, b2) Swap all "depends on FOO" to "select FOO" h]jd)}(hhh](jh)}(h7Remove any superfluous "select FOO" or "depends on FOO"h]h)}(hjEh]h?Remove any superfluous “select FOO” or “depends on FOO”}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jghj@ubjh)}(hMatch dependency semantics: b1) Swap all "select FOO" to "depends on FOO" or, b2) Swap all "depends on FOO" to "select FOO" h](h)}(hMatch dependency semantics:h]hMatch dependency semantics:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubj")}(hab1) Swap all "select FOO" to "depends on FOO" or, b2) Swap all "depends on FOO" to "select FOO" h](h)}(h1b1) Swap all "select FOO" to "depends on FOO" or,h]h9b1) Swap all “select FOO” to “depends on FOO” or,}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlubh)}(h-b2) Swap all "depends on FOO" to "select FOO"h]h5b2) Swap all “depends on FOO” to “select FOO”}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlubeh}(h]h ]h"]h$]h&]uh1j!hhhMhjZubeh}(h]h ]h"]h$]h&]uh1jghj@ubeh}(h]h ]h"]h$]h&]jjjhjjuh1jchj<ubah}(h]h ]h"]h$]h&]uh1j!hhhMhjhhubh)}(hXcThe resolution to a) can be tested with the sample Kconfig file Documentation/kbuild/Kconfig.recursion-issue-01 through the removal of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already since CORE_BELL_A depends on CORE. At times it may not be possible to remove some dependency criteria, for such cases you can work with solution b).h]hXgThe resolution to a) can be tested with the sample Kconfig file Documentation/kbuild/Kconfig.recursion-issue-01 through the removal of the “select CORE” from CORE_BELL_A_ADVANCED as that is implicit already since CORE_BELL_A depends on CORE. At times it may not be possible to remove some dependency criteria, for such cases you can work with solution b).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h~The two different resolutions for b) can be tested in the sample Kconfig file Documentation/kbuild/Kconfig.recursion-issue-02.h]h~The two different resolutions for b) can be tested in the sample Kconfig file Documentation/kbuild/Kconfig.recursion-issue-02.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hBelow is a list of examples of prior fixes for these types of recursive issues; all errors appear to involve one or more "select" statements and one or more "depends on".h]hBelow is a list of examples of prior fixes for these types of recursive issues; all errors appear to involve one or more “select” statements and one or more “depends on”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj-)}(hhh]j2)}(hhh](j7)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j6hjubj7)}(hhh]h}(h]h ]h"]h$]h&]colwidthK#uh1j6hjubja)}(hhh]jf)}(hhh](jk)}(hhh]h)}(hcommith]hcommit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hfixh]hfix}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubah}(h]h ]h"]h$]h&]uh1j`hjubj)}(hhh](jf)}(hhh](jk)}(hhh]h)}(h 06b718c01208h]h 06b718c01208}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jjhj+ubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h c22eacfe82f9h]h c22eacfe82f9}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jjhjbubjk)}(hhh]h)}(hdepends on A -> depends on Bh]hdepends on A -> depends on B}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|ubah}(h]h ]h"]h$]h&]uh1jjhjbubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 6a91e854442ch]h 6a91e854442c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 118c565a8f2eh]h 118c565a8f2e}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> select Bh]hselect A -> select B}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h f004e5594705h]h f004e5594705}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h c7861f37b4c6h]h c7861f37b4c6}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jjhj>ubjk)}(hhh]h)}(hdepends on A -> (null)h]hdepends on A -> (null)}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1jjhj>ubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 80c69915e5fbh]h 80c69915e5fb}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubah}(h]h ]h"]h$]h&]uh1jjhjuubjk)}(hhh]h)}(h#select A -> (null) (1)h]h#select A -> (null) (1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjuubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h c2218e26c0d0h]h c2218e26c0d0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(h#select A -> depends on A (1)h]h#select A -> depends on A (1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h d6ae99d04e1ch]h d6ae99d04e1c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 95ca19cf8cbfh]h 95ca19cf8cbf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 8f057d7bca54h]h 8f057d7bca54}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jjhjQubjk)}(hhh]h)}(hdepends on A -> (null)h]hdepends on A -> (null)}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubah}(h]h ]h"]h$]h&]uh1jjhjQubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 8f057d7bca54h]h 8f057d7bca54}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hdepends on A -> select Ah]hdepends on A -> select A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h a0701f04846eh]h a0701f04846e}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 0c8b92f7f259h]h 0c8b92f7f259}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hdepends on A -> (null)h]hdepends on A -> (null)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h e4e9e0540928h]h e4e9e0540928}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jjhj-ubjk)}(hhh]h)}(h#select A -> depends on A (2)h]h#select A -> depends on A (2)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jjhj-ubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 7453ea886e87h]h 7453ea886e87}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jjhjdubjk)}(hhh]h)}(h#depends on A > (null) (1)h]h#depends on A > (null) (1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jjhjdubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 7b1fff7e4fdfh]h 7b1fff7e4fdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 86c747d2a4f0h]h 86c747d2a4f0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h d9f9ab51e55eh]h d9f9ab51e55e}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jjhj ubjk)}(hhh]h)}(hselect A -> depends on Ah]hselect A -> depends on A}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jjhj ubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 0c51a4d8abd6h]h 0c51a4d8abd6}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jjhj@ubjk)}(hhh]h)}(h#depends on A -> select A (3)h]h#depends on A -> select A (3)}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jjhj@ubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h e98062ed6dc4h]h e98062ed6dc4}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzubah}(h]h ]h"]h$]h&]uh1jjhjwubjk)}(hhh]h)}(h#select A -> depends on A (3)h]h#select A -> depends on A (3)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjwubeh}(h]h ]h"]h$]h&]uh1jehj(ubjf)}(hhh](jk)}(hhh]h)}(h 91e5d284a7f1h]h 91e5d284a7f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh]h)}(hselect A -> (null)h]hselect A -> (null)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj(ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j1hjubah}(h]h ]h"]h$]h&]uh1j,hjhhhhhNubjd)}(hhh](jh)}(hPartial (or no) quote of error.h]h)}(hjh]hPartial (or no) quote of error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(h&That seems to be the gist of that fix.h]h)}(hjh]h&That seems to be the gist of that fix.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubjh)}(h Same error. h]h)}(h Same error.h]h Same error.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubeh}(h]h ]h"]h$]h&]jj jj jjuh1jchjhhhhhMubeh}(h].practical-solutions-to-kconfig-recursive-issueah ]h"].practical solutions to kconfig recursive issueah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hFuture kconfig workh]hFuture kconfig work}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhMubh)}(hXWork on kconfig is welcomed on both areas of clarifying semantics and on evaluating the use of a full SAT solver for it. A full SAT solver can be desirable to enable more complex dependency mappings and / or queries, for instance one possible use case for a SAT solver could be that of handling the current known recursive dependency issues. It is not known if this would address such issues but such evaluation is desirable. If support for a full SAT solver proves too complex or that it cannot address recursive dependency issues Kconfig should have at least clear and well defined semantics which also addresses and documents limitations or requirements such as the ones dealing with recursive dependencies.h]hXWork on kconfig is welcomed on both areas of clarifying semantics and on evaluating the use of a full SAT solver for it. A full SAT solver can be desirable to enable more complex dependency mappings and / or queries, for instance one possible use case for a SAT solver could be that of handling the current known recursive dependency issues. It is not known if this would address such issues but such evaluation is desirable. If support for a full SAT solver proves too complex or that it cannot address recursive dependency issues Kconfig should have at least clear and well defined semantics which also addresses and documents limitations or requirements such as the ones dealing with recursive dependencies.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubh)}(hvFurther work on both of these areas is welcomed on Kconfig. We elaborate on both of these in the next two subsections.h]hvFurther work on both of these areas is welcomed on Kconfig. We elaborate on both of these in the next two subsections.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubeh}(h]future-kconfig-workah ]h"]future kconfig workah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hSemantics of Kconfigh]hSemantics of Kconfig}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hX_The use of Kconfig is broad, Linux is now only one of Kconfig's users: one study has completed a broad analysis of Kconfig use in 12 projects [0]_. Despite its widespread use, and although this document does a reasonable job in documenting basic Kconfig syntax a more precise definition of Kconfig semantics is welcomed. One project deduced Kconfig semantics through the use of the xconfig configurator [1]_. Work should be done to confirm if the deduced semantics matches our intended Kconfig design goals. Another project formalized a denotational semantics of a core subset of the Kconfig language [10]_.h](hThe use of Kconfig is broad, Linux is now only one of Kconfig’s users: one study has completed a broad analysis of Kconfig use in 12 projects }(hjhhhNhNubhfootnote_reference)}(h[0]_h]h0}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]refidid10docnamekbuild/kconfig-languageuh1jhjresolvedKubhX. Despite its widespread use, and although this document does a reasonable job in documenting basic Kconfig syntax a more precise definition of Kconfig semantics is welcomed. One project deduced Kconfig semantics through the use of the xconfig configurator }(hjhhhNhNubj)}(h[1]_h]h1}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]jid11jjuh1jhjjKubh. Work should be done to confirm if the deduced semantics matches our intended Kconfig design goals. Another project formalized a denotational semantics of a core subset of the Kconfig language }(hjhhhNhNubj)}(h[10]_h]h10}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]jid26jjuh1jhjjKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXJHaving well defined semantics can be useful for tools for practical evaluation of dependencies, for instance one such case was work to express in boolean abstraction of the inferred semantics of Kconfig to translate Kconfig logic into boolean formulas and run a SAT solver on this to find dead code / features (always inactive), 114 dead features were found in Linux using this methodology [1]_ (Section 8: Threats to validity). The kismet tool, based on the semantics in [10]_, finds abuses of reverse dependencies and has led to dozens of committed fixes to Linux Kconfig files [11]_.h](hXHaving well defined semantics can be useful for tools for practical evaluation of dependencies, for instance one such case was work to express in boolean abstraction of the inferred semantics of Kconfig to translate Kconfig logic into boolean formulas and run a SAT solver on this to find dead code / features (always inactive), 114 dead features were found in Linux using this methodology }(hjhhhNhNubj)}(h[1]_h]h1}(hjhhhNhNubah}(h]id4ah ]h"]h$]h&]jjjjuh1jhjjKubhN (Section 8: Threats to validity). The kismet tool, based on the semantics in }(hjhhhNhNubj)}(h[10]_h]h10}(hjhhhNhNubah}(h]id5ah ]h"]h$]h&]jjjjuh1jhjjKubhg, finds abuses of reverse dependencies and has led to dozens of committed fixes to Linux Kconfig files }(hjhhhNhNubj)}(h[11]_h]h11}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]jid27jjuh1jhjjKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXConfirming this could prove useful as Kconfig stands as one of the leading industrial variability modeling languages [1]_ [2]_. Its study would help evaluate practical uses of such languages, their use was only theoretical and real world requirements were not well understood. As it stands though only reverse engineering techniques have been used to deduce semantics from variability modeling languages such as Kconfig [3]_.h](huConfirming this could prove useful as Kconfig stands as one of the leading industrial variability modeling languages }(hj-hhhNhNubj)}(h[1]_h]h1}(hj5hhhNhNubah}(h]id7ah ]h"]h$]h&]jjjjuh1jhj-jKubh }(hj-hhhNhNubj)}(h[2]_h]h2}(hjHhhhNhNubah}(h]id8ah ]h"]h$]h&]jid12jjuh1jhj-jKubhX&. Its study would help evaluate practical uses of such languages, their use was only theoretical and real world requirements were not well understood. As it stands though only reverse engineering techniques have been used to deduce semantics from variability modeling languages such as Kconfig }(hj-hhhNhNubj)}(h[3]_h]h3}(hj\hhhNhNubah}(h]id9ah ]h"]h$]h&]jid13jjuh1jhj-jKubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubhfootnote)}(h9https://www.eng.uwaterloo.ca/~shshe/kconfig_semantics.pdfh](hlabel)}(h0h]h0}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjxubh)}(hjzh]h reference)}(hjzh]h9https://www.eng.uwaterloo.ca/~shshe/kconfig_semantics.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijzuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubeh}(h]jah ]h"]0ah$]h&]jajjuh1jvhhhMhjhhjKubjw)}(h?https://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdfh](j})}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]h?https://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]jah ]h"]1ah$]h&](jjj?ejjuh1jvhhhMhjhhjKubjw)}(h@https://gsd.uwaterloo.ca/sites/default/files/ase241-berger_0.pdfh](j})}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]h@https://gsd.uwaterloo.ca/sites/default/files/ase241-berger_0.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]jWah ]h"]2ah$]h&]jRajjuh1jvhhhMhjhhjKubjw)}(h:https://gsd.uwaterloo.ca/sites/default/files/icse2011.pdf h](j})}(h3h]h3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hj ubh)}(h9https://gsd.uwaterloo.ca/sites/default/files/icse2011.pdfh]j)}(hj h]h9https://gsd.uwaterloo.ca/sites/default/files/icse2011.pdf}(hj"hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]jkah ]h"]3ah$]h&]jfajjuh1jvhhhMhjhhjKubeh}(h]semantics-of-kconfigah ]h"]semantics of kconfigah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hFull SAT solver for Kconfigh]hFull SAT solver for Kconfig}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhMubh)}(hXAlthough SAT solvers [4]_ haven't yet been used by Kconfig directly, as noted in the previous subsection, work has been done however to express in boolean abstraction the inferred semantics of Kconfig to translate Kconfig logic into boolean formulas and run a SAT solver on it [5]_. Another known related project is CADOS [6]_ (former VAMOS [7]_) and the tools, mainly undertaker [8]_, which has been introduced first with [9]_. The basic concept of undertaker is to extract variability models from Kconfig and put them together with a propositional formula extracted from CPP #ifdefs and build-rules into a SAT solver in order to find dead code, dead files, and dead symbols. If using a SAT solver is desirable on Kconfig one approach would be to evaluate repurposing such efforts somehow on Kconfig. There is enough interest from mentors of existing projects to not only help advise how to integrate this work upstream but also help maintain it long term. Interested developers should visit:h](hAlthough SAT solvers }(hjVhhhNhNubj)}(h[4]_h]h4}(hj^hhhNhNubah}(h]id14ah ]h"]h$]h&]jid20jjuh1jhjVjKubh haven’t yet been used by Kconfig directly, as noted in the previous subsection, work has been done however to express in boolean abstraction the inferred semantics of Kconfig to translate Kconfig logic into boolean formulas and run a SAT solver on it }(hjVhhhNhNubj)}(h[5]_h]h5}(hjrhhhNhNubah}(h]id15ah ]h"]h$]h&]jid21jjuh1jhjVjKubh). Another known related project is CADOS }(hjVhhhNhNubj)}(h[6]_h]h6}(hjhhhNhNubah}(h]id16ah ]h"]h$]h&]jid22jjuh1jhjVjKubh (former VAMOS }(hjVhhhNhNubj)}(h[7]_h]h7}(hjhhhNhNubah}(h]id17ah ]h"]h$]h&]jid23jjuh1jhjVjKubh#) and the tools, mainly undertaker }(hjVhhhNhNubj)}(h[8]_h]h8}(hjhhhNhNubah}(h]id18ah ]h"]h$]h&]jid24jjuh1jhjVjKubh', which has been introduced first with }(hjVhhhNhNubj)}(h[9]_h]h9}(hjhhhNhNubah}(h]id19ah ]h"]h$]h&]jid25jjuh1jhjVjKubhX7. The basic concept of undertaker is to extract variability models from Kconfig and put them together with a propositional formula extracted from CPP #ifdefs and build-rules into a SAT solver in order to find dead code, dead files, and dead symbols. If using a SAT solver is desirable on Kconfig one approach would be to evaluate repurposing such efforts somehow on Kconfig. There is enough interest from mentors of existing projects to not only help advise how to integrate this work upstream but also help maintain it long term. Interested developers should visit:}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjEhhubh)}(h4https://kernelnewbies.org/KernelProjects/kconfig-sath]j)}(hjh]h4https://kernelnewbies.org/KernelProjects/kconfig-sat}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjEhhubjw)}(hFhttps://www.cs.cornell.edu/~sabhar/chapters/SATSolvers-KR-Handbook.pdfh](j})}(h4h]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]hFhttps://www.cs.cornell.edu/~sabhar/chapters/SATSolvers-KR-Handbook.pdf}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]jmah ]h"]4ah$]h&]jhajjuh1jvhhhMhjEhhjKubjw)}(h?https://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdfh](j})}(h5h]h5}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hj$ubh)}(hj&h]j)}(hj&h]h?https://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf}(hj9hhhNhNubah}(h]h ]h"]h$]h&]refurij&uh1jhj6ubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubeh}(h]jah ]h"]5ah$]h&]j|ajjuh1jvhhhMhjEhhjKubjw)}(hhttps://cados.cs.fau.deh](j})}(h6h]h6}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjTubh)}(hjVh]j)}(hjVh]hhttps://cados.cs.fau.de}(hjihhhNhNubah}(h]h ]h"]h$]h&]refurijVuh1jhjfubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubeh}(h]jah ]h"]6ah$]h&]jajjuh1jvhhhMhjEhhjKubjw)}(hhttps://vamos.cs.fau.deh](j})}(h7h]h7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]hhttps://vamos.cs.fau.de}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]jah ]h"]7ah$]h&]jajjuh1jvhhhMhjEhhjKubjw)}(hhttps://undertaker.cs.fau.deh](j})}(h8h]h8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]hhttps://undertaker.cs.fau.de}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]jah ]h"]8ah$]h&]jajjuh1jvhhhMhjEhhjKubjw)}(h?https://www4.cs.fau.de/Publications/2011/tartler_11_eurosys.pdfh](j})}(h9h]h9}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]h?https://www4.cs.fau.de/Publications/2011/tartler_11_eurosys.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]jah ]h"]9ah$]h&]jajjuh1jvhhhM hjEhhjKubjw)}(h-https://paulgazzillo.com/papers/esecfse21.pdfh](j})}(h10h]h10}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubh)}(hjh]j)}(hjh]h-https://paulgazzillo.com/papers/esecfse21.pdf}(hj)hhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]jah ]h"]10ah$]h&](jj ejjuh1jvhhhM hjEhhjKubjw)}(h https://github.com/paulgazz/kmaxh](j})}(h11h]h11}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjDubh)}(hjFh]j)}(hjFh]h https://github.com/paulgazz/kmax}(hjYhhhNhNubah}(h]h ]h"]h$]h&]refurijFuh1jhjVubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubeh}(h]j"ah ]h"]11ah$]h&]jajjuh1jvhhhM hjEhhjKubeh}(h]full-sat-solver-for-kconfigah ]h"]full sat solver for kconfigah$]h&]uh1hhj hhhhhMubeh}(h] kconfig-hintsah ]h"] kconfig hintsah$]h&]uh1hhhhhhhhMubeh}(h]kconfig-languageah ]h"]kconfig languageah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(0]ja1](jjj5e10](jje11]ja2]jHa3]j\a4]j^a5]jra6]ja7]ja8]ja9]jaurefids}nameids}(jjhhj@j=j|jyj j jH jE j j jj~j j j j j*j'jQjNjjjmjjjjjjjjjLjIjj~jBj?jjjjj jWj:jkjyjvj!jmjQjjjjjjjjjjAjjqj"u nametypes}(jhj@j|j jH j jj j j*jQjjmjjjjLjjBjjj j:jyj!jQjjjjjAjquh}(jhhhj=jjyjCj jjE j j jK j~j j j j j j'j jNj-jjTjjjjjpjjjjjIjj~jOj?jjjjjjjjjj jjjj?j5jRjHjfj\jjxjjjWjjkj jvjEjhj^j|jrjjjjjjjjjmjjj$jjTjjjjjjjjj"jDu footnote_refs}(j]jaj](jjj5ej](jjej]jaj]jHaj]j\aj]j^aj]jraj]jaj]jaj]jaj]jau citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes](jxjjj jj$jTjjjjjDe citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.