kconfig-language.txt 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. Introduction
  2. ------------
  3. The configuration database is a collection of configuration options
  4. organized in a tree structure:
  5. +- Code maturity level options
  6. | +- Prompt for development and/or incomplete code/drivers
  7. +- General setup
  8. | +- Networking support
  9. | +- System V IPC
  10. | +- BSD Process Accounting
  11. | +- Sysctl support
  12. +- Loadable module support
  13. | +- Enable loadable module support
  14. | +- Set version information on all module symbols
  15. | +- Kernel module loader
  16. +- ...
  17. Every entry has its own dependencies. These dependencies are used
  18. to determine the visibility of an entry. Any child entry is only
  19. visible if its parent entry is also visible.
  20. Menu entries
  21. ------------
  22. Most entries define a config option; all other entries help to organize
  23. them. A single configuration option is defined like this:
  24. config MODVERSIONS
  25. bool "Set version information on all module symbols"
  26. depends on MODULES
  27. help
  28. Usually, modules have to be recompiled whenever you switch to a new
  29. kernel. ...
  30. Every line starts with a key word and can be followed by multiple
  31. arguments. "config" starts a new config entry. The following lines
  32. define attributes for this config option. Attributes can be the type of
  33. the config option, input prompt, dependencies, help text and default
  34. values. A config option can be defined multiple times with the same
  35. name, but every definition can have only a single input prompt and the
  36. type must not conflict.
  37. Menu attributes
  38. ---------------
  39. A menu entry can have a number of attributes. Not all of them are
  40. applicable everywhere (see syntax).
  41. - type definition: "bool"/"tristate"/"string"/"hex"/"int"
  42. Every config option must have a type. There are only two basic types:
  43. tristate and string; the other types are based on these two. The type
  44. definition optionally accepts an input prompt, so these two examples
  45. are equivalent:
  46. bool "Networking support"
  47. and
  48. bool
  49. prompt "Networking support"
  50. - input prompt: "prompt" <prompt> ["if" <expr>]
  51. Every menu entry can have at most one prompt, which is used to display
  52. to the user. Optionally dependencies only for this prompt can be added
  53. with "if".
  54. - default value: "default" <expr> ["if" <expr>]
  55. A config option can have any number of default values. If multiple
  56. default values are visible, only the first defined one is active.
  57. Default values are not limited to the menu entry where they are
  58. defined. This means the default can be defined somewhere else or be
  59. overridden by an earlier definition.
  60. The default value is only assigned to the config symbol if no other
  61. value was set by the user (via the input prompt above). If an input
  62. prompt is visible the default value is presented to the user and can
  63. be overridden by him.
  64. Optionally, dependencies only for this default value can be added with
  65. "if".
  66. The default value deliberately defaults to 'n' in order to avoid bloating the
  67. build. With few exceptions, new config options should not change this. The
  68. intent is for "make oldconfig" to add as little as possible to the config from
  69. release to release.
  70. Note:
  71. Things that merit "default y/m" include:
  72. a) A new Kconfig option for something that used to always be built
  73. should be "default y".
  74. b) A new gatekeeping Kconfig option that hides/shows other Kconfig
  75. options (but does not generate any code of its own), should be
  76. "default y" so people will see those other options.
  77. c) Sub-driver behavior or similar options for a driver that is
  78. "default n". This allows you to provide sane defaults.
  79. d) Hardware or infrastructure that everybody expects, such as CONFIG_NET
  80. or CONFIG_BLOCK. These are rare exceptions.
  81. - type definition + default value:
  82. "def_bool"/"def_tristate" <expr> ["if" <expr>]
  83. This is a shorthand notation for a type definition plus a value.
  84. Optionally dependencies for this default value can be added with "if".
  85. - dependencies: "depends on" <expr>
  86. This defines a dependency for this menu entry. If multiple
  87. dependencies are defined, they are connected with '&&'. Dependencies
  88. are applied to all other options within this menu entry (which also
  89. accept an "if" expression), so these two examples are equivalent:
  90. bool "foo" if BAR
  91. default y if BAR
  92. and
  93. depends on BAR
  94. bool "foo"
  95. default y
  96. - reverse dependencies: "select" <symbol> ["if" <expr>]
  97. While normal dependencies reduce the upper limit of a symbol (see
  98. below), reverse dependencies can be used to force a lower limit of
  99. another symbol. The value of the current menu symbol is used as the
  100. minimal value <symbol> can be set to. If <symbol> is selected multiple
  101. times, the limit is set to the largest selection.
  102. Reverse dependencies can only be used with boolean or tristate
  103. symbols.
  104. Note:
  105. select should be used with care. select will force
  106. a symbol to a value without visiting the dependencies.
  107. By abusing select you are able to select a symbol FOO even
  108. if FOO depends on BAR that is not set.
  109. In general use select only for non-visible symbols
  110. (no prompts anywhere) and for symbols with no dependencies.
  111. That will limit the usefulness but on the other hand avoid
  112. the illegal configurations all over.
  113. - weak reverse dependencies: "imply" <symbol> ["if" <expr>]
  114. This is similar to "select" as it enforces a lower limit on another
  115. symbol except that the "implied" symbol's value may still be set to n
  116. from a direct dependency or with a visible prompt.
  117. Given the following example:
  118. config FOO
  119. tristate
  120. imply BAZ
  121. config BAZ
  122. tristate
  123. depends on BAR
  124. The following values are possible:
  125. FOO BAR BAZ's default choice for BAZ
  126. --- --- ------------- --------------
  127. n y n N/m/y
  128. m y m M/y/n
  129. y y y Y/n
  130. y n * N
  131. This is useful e.g. with multiple drivers that want to indicate their
  132. ability to hook into a secondary subsystem while allowing the user to
  133. configure that subsystem out without also having to unset these drivers.
  134. - limiting menu display: "visible if" <expr>
  135. This attribute is only applicable to menu blocks, if the condition is
  136. false, the menu block is not displayed to the user (the symbols
  137. contained there can still be selected by other symbols, though). It is
  138. similar to a conditional "prompt" attribute for individual menu
  139. entries. Default value of "visible" is true.
  140. - numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
  141. This allows to limit the range of possible input values for int
  142. and hex symbols. The user can only input a value which is larger than
  143. or equal to the first symbol and smaller than or equal to the second
  144. symbol.
  145. - help text: "help" or "---help---"
  146. This defines a help text. The end of the help text is determined by
  147. the indentation level, this means it ends at the first line which has
  148. a smaller indentation than the first line of the help text.
  149. "---help---" and "help" do not differ in behaviour, "---help---" is
  150. used to help visually separate configuration logic from help within
  151. the file as an aid to developers.
  152. - misc options: "option" <symbol>[=<value>]
  153. Various less common options can be defined via this option syntax,
  154. which can modify the behaviour of the menu entry and its config
  155. symbol. These options are currently possible:
  156. - "defconfig_list"
  157. This declares a list of default entries which can be used when
  158. looking for the default configuration (which is used when the main
  159. .config doesn't exists yet.)
  160. - "modules"
  161. This declares the symbol to be used as the MODULES symbol, which
  162. enables the third modular state for all config symbols.
  163. At most one symbol may have the "modules" option set.
  164. - "allnoconfig_y"
  165. This declares the symbol as one that should have the value y when
  166. using "allnoconfig". Used for symbols that hide other symbols.
  167. Menu dependencies
  168. -----------------
  169. Dependencies define the visibility of a menu entry and can also reduce
  170. the input range of tristate symbols. The tristate logic used in the
  171. expressions uses one more state than normal boolean logic to express the
  172. module state. Dependency expressions have the following syntax:
  173. <expr> ::= <symbol> (1)
  174. <symbol> '=' <symbol> (2)
  175. <symbol> '!=' <symbol> (3)
  176. <symbol1> '<' <symbol2> (4)
  177. <symbol1> '>' <symbol2> (4)
  178. <symbol1> '<=' <symbol2> (4)
  179. <symbol1> '>=' <symbol2> (4)
  180. '(' <expr> ')' (5)
  181. '!' <expr> (6)
  182. <expr> '&&' <expr> (7)
  183. <expr> '||' <expr> (8)
  184. Expressions are listed in decreasing order of precedence.
  185. (1) Convert the symbol into an expression. Boolean and tristate symbols
  186. are simply converted into the respective expression values. All
  187. other symbol types result in 'n'.
  188. (2) If the values of both symbols are equal, it returns 'y',
  189. otherwise 'n'.
  190. (3) If the values of both symbols are equal, it returns 'n',
  191. otherwise 'y'.
  192. (4) If value of <symbol1> is respectively lower, greater, lower-or-equal,
  193. or greater-or-equal than value of <symbol2>, it returns 'y',
  194. otherwise 'n'.
  195. (5) Returns the value of the expression. Used to override precedence.
  196. (6) Returns the result of (2-/expr/).
  197. (7) Returns the result of min(/expr/, /expr/).
  198. (8) Returns the result of max(/expr/, /expr/).
  199. An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
  200. respectively for calculations). A menu entry becomes visible when its
  201. expression evaluates to 'm' or 'y'.
  202. There are two types of symbols: constant and non-constant symbols.
  203. Non-constant symbols are the most common ones and are defined with the
  204. 'config' statement. Non-constant symbols consist entirely of alphanumeric
  205. characters or underscores.
  206. Constant symbols are only part of expressions. Constant symbols are
  207. always surrounded by single or double quotes. Within the quote, any
  208. other character is allowed and the quotes can be escaped using '\'.
  209. Menu structure
  210. --------------
  211. The position of a menu entry in the tree is determined in two ways. First
  212. it can be specified explicitly:
  213. menu "Network device support"
  214. depends on NET
  215. config NETDEVICES
  216. ...
  217. endmenu
  218. All entries within the "menu" ... "endmenu" block become a submenu of
  219. "Network device support". All subentries inherit the dependencies from
  220. the menu entry, e.g. this means the dependency "NET" is added to the
  221. dependency list of the config option NETDEVICES.
  222. The other way to generate the menu structure is done by analyzing the
  223. dependencies. If a menu entry somehow depends on the previous entry, it
  224. can be made a submenu of it. First, the previous (parent) symbol must
  225. be part of the dependency list and then one of these two conditions
  226. must be true:
  227. - the child entry must become invisible, if the parent is set to 'n'
  228. - the child entry must only be visible, if the parent is visible
  229. config MODULES
  230. bool "Enable loadable module support"
  231. config MODVERSIONS
  232. bool "Set version information on all module symbols"
  233. depends on MODULES
  234. comment "module support disabled"
  235. depends on !MODULES
  236. MODVERSIONS directly depends on MODULES, this means it's only visible if
  237. MODULES is different from 'n'. The comment on the other hand is only
  238. visible when MODULES is set to 'n'.
  239. Kconfig syntax
  240. --------------
  241. The configuration file describes a series of menu entries, where every
  242. line starts with a keyword (except help texts). The following keywords
  243. end a menu entry:
  244. - config
  245. - menuconfig
  246. - choice/endchoice
  247. - comment
  248. - menu/endmenu
  249. - if/endif
  250. - source
  251. The first five also start the definition of a menu entry.
  252. config:
  253. "config" <symbol>
  254. <config options>
  255. This defines a config symbol <symbol> and accepts any of above
  256. attributes as options.
  257. menuconfig:
  258. "menuconfig" <symbol>
  259. <config options>
  260. This is similar to the simple config entry above, but it also gives a
  261. hint to front ends, that all suboptions should be displayed as a
  262. separate list of options. To make sure all the suboptions will really
  263. show up under the menuconfig entry and not outside of it, every item
  264. from the <config options> list must depend on the menuconfig symbol.
  265. In practice, this is achieved by using one of the next two constructs:
  266. (1):
  267. menuconfig M
  268. if M
  269. config C1
  270. config C2
  271. endif
  272. (2):
  273. menuconfig M
  274. config C1
  275. depends on M
  276. config C2
  277. depends on M
  278. In the following examples (3) and (4), C1 and C2 still have the M
  279. dependency, but will not appear under menuconfig M anymore, because
  280. of C0, which doesn't depend on M:
  281. (3):
  282. menuconfig M
  283. config C0
  284. if M
  285. config C1
  286. config C2
  287. endif
  288. (4):
  289. menuconfig M
  290. config C0
  291. config C1
  292. depends on M
  293. config C2
  294. depends on M
  295. choices:
  296. "choice" [symbol]
  297. <choice options>
  298. <choice block>
  299. "endchoice"
  300. This defines a choice group and accepts any of the above attributes as
  301. options. A choice can only be of type bool or tristate. If no type is
  302. specified for a choice, its type will be determined by the type of
  303. the first choice element in the group or remain unknown if none of the
  304. choice elements have a type specified, as well.
  305. While a boolean choice only allows a single config entry to be
  306. selected, a tristate choice also allows any number of config entries
  307. to be set to 'm'. This can be used if multiple drivers for a single
  308. hardware exists and only a single driver can be compiled/loaded into
  309. the kernel, but all drivers can be compiled as modules.
  310. A choice accepts another option "optional", which allows to set the
  311. choice to 'n' and no entry needs to be selected.
  312. If no [symbol] is associated with a choice, then you can not have multiple
  313. definitions of that choice. If a [symbol] is associated to the choice,
  314. then you may define the same choice (i.e. with the same entries) in another
  315. place.
  316. comment:
  317. "comment" <prompt>
  318. <comment options>
  319. This defines a comment which is displayed to the user during the
  320. configuration process and is also echoed to the output files. The only
  321. possible options are dependencies.
  322. menu:
  323. "menu" <prompt>
  324. <menu options>
  325. <menu block>
  326. "endmenu"
  327. This defines a menu block, see "Menu structure" above for more
  328. information. The only possible options are dependencies and "visible"
  329. attributes.
  330. if:
  331. "if" <expr>
  332. <if block>
  333. "endif"
  334. This defines an if block. The dependency expression <expr> is appended
  335. to all enclosed menu entries.
  336. source:
  337. "source" <prompt>
  338. This reads the specified configuration file. This file is always parsed.
  339. mainmenu:
  340. "mainmenu" <prompt>
  341. This sets the config program's title bar if the config program chooses
  342. to use it. It should be placed at the top of the configuration, before any
  343. other statement.
  344. '#' Kconfig source file comment:
  345. An unquoted '#' character anywhere in a source file line indicates
  346. the beginning of a source file comment. The remainder of that line
  347. is a comment.
  348. Kconfig hints
  349. -------------
  350. This is a collection of Kconfig tips, most of which aren't obvious at
  351. first glance and most of which have become idioms in several Kconfig
  352. files.
  353. Adding common features and make the usage configurable
  354. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  355. It is a common idiom to implement a feature/functionality that are
  356. relevant for some architectures but not all.
  357. The recommended way to do so is to use a config variable named HAVE_*
  358. that is defined in a common Kconfig file and selected by the relevant
  359. architectures.
  360. An example is the generic IOMAP functionality.
  361. We would in lib/Kconfig see:
  362. # Generic IOMAP is used to ...
  363. config HAVE_GENERIC_IOMAP
  364. config GENERIC_IOMAP
  365. depends on HAVE_GENERIC_IOMAP && FOO
  366. And in lib/Makefile we would see:
  367. obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
  368. For each architecture using the generic IOMAP functionality we would see:
  369. config X86
  370. select ...
  371. select HAVE_GENERIC_IOMAP
  372. select ...
  373. Note: we use the existing config option and avoid creating a new
  374. config variable to select HAVE_GENERIC_IOMAP.
  375. Note: the use of the internal config variable HAVE_GENERIC_IOMAP, it is
  376. introduced to overcome the limitation of select which will force a
  377. config option to 'y' no matter the dependencies.
  378. The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the
  379. situation where select forces a symbol equals to 'y'.
  380. Adding features that need compiler support
  381. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  382. There are several features that need compiler support. The recommended way
  383. to describe the dependency on the compiler feature is to use "depends on"
  384. followed by a test macro.
  385. config STACKPROTECTOR
  386. bool "Stack Protector buffer overflow detection"
  387. depends on $(cc-option,-fstack-protector)
  388. ...
  389. If you need to expose a compiler capability to makefiles and/or C source files,
  390. CC_HAS_ is the recommended prefix for the config option.
  391. config CC_HAS_STACKPROTECTOR_NONE
  392. def_bool $(cc-option,-fno-stack-protector)
  393. Build as module only
  394. ~~~~~~~~~~~~~~~~~~~~
  395. To restrict a component build to module-only, qualify its config symbol
  396. with "depends on m". E.g.:
  397. config FOO
  398. depends on BAR && m
  399. limits FOO to module (=m) or disabled (=n).
  400. Kconfig recursive dependency limitations
  401. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  402. If you've hit the Kconfig error: "recursive dependency detected" you've run
  403. into a recursive dependency issue with Kconfig, a recursive dependency can be
  404. summarized as a circular dependency. The kconfig tools need to ensure that
  405. Kconfig files comply with specified configuration requirements. In order to do
  406. that kconfig must determine the values that are possible for all Kconfig
  407. symbols, this is currently not possible if there is a circular relation
  408. between two or more Kconfig symbols. For more details refer to the "Simple
  409. Kconfig recursive issue" subsection below. Kconfig does not do recursive
  410. dependency resolution; this has a few implications for Kconfig file writers.
  411. We'll first explain why this issues exists and then provide an example
  412. technical limitation which this brings upon Kconfig developers. Eager
  413. developers wishing to try to address this limitation should read the next
  414. subsections.
  415. Simple Kconfig recursive issue
  416. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  417. Read: Documentation/kbuild/Kconfig.recursion-issue-01
  418. Test with:
  419. make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig
  420. Cumulative Kconfig recursive issue
  421. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  422. Read: Documentation/kbuild/Kconfig.recursion-issue-02
  423. Test with:
  424. make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig
  425. Practical solutions to kconfig recursive issue
  426. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  427. Developers who run into the recursive Kconfig issue have two options
  428. at their disposal. We document them below and also provide a list of
  429. historical issues resolved through these different solutions.
  430. a) Remove any superfluous "select FOO" or "depends on FOO"
  431. b) Match dependency semantics:
  432. b1) Swap all "select FOO" to "depends on FOO" or,
  433. b2) Swap all "depends on FOO" to "select FOO"
  434. The resolution to a) can be tested with the sample Kconfig file
  435. Documentation/kbuild/Kconfig.recursion-issue-01 through the removal
  436. of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already
  437. since CORE_BELL_A depends on CORE. At times it may not be possible to remove
  438. some dependency criteria, for such cases you can work with solution b).
  439. The two different resolutions for b) can be tested in the sample Kconfig file
  440. Documentation/kbuild/Kconfig.recursion-issue-02.
  441. Below is a list of examples of prior fixes for these types of recursive issues;
  442. all errors appear to involve one or more select's and one or more "depends on".
  443. commit fix
  444. ====== ===
  445. 06b718c01208 select A -> depends on A
  446. c22eacfe82f9 depends on A -> depends on B
  447. 6a91e854442c select A -> depends on A
  448. 118c565a8f2e select A -> select B
  449. f004e5594705 select A -> depends on A
  450. c7861f37b4c6 depends on A -> (null)
  451. 80c69915e5fb select A -> (null) (1)
  452. c2218e26c0d0 select A -> depends on A (1)
  453. d6ae99d04e1c select A -> depends on A
  454. 95ca19cf8cbf select A -> depends on A
  455. 8f057d7bca54 depends on A -> (null)
  456. 8f057d7bca54 depends on A -> select A
  457. a0701f04846e select A -> depends on A
  458. 0c8b92f7f259 depends on A -> (null)
  459. e4e9e0540928 select A -> depends on A (2)
  460. 7453ea886e87 depends on A > (null) (1)
  461. 7b1fff7e4fdf select A -> depends on A
  462. 86c747d2a4f0 select A -> depends on A
  463. d9f9ab51e55e select A -> depends on A
  464. 0c51a4d8abd6 depends on A -> select A (3)
  465. e98062ed6dc4 select A -> depends on A (3)
  466. 91e5d284a7f1 select A -> (null)
  467. (1) Partial (or no) quote of error.
  468. (2) That seems to be the gist of that fix.
  469. (3) Same error.
  470. Future kconfig work
  471. ~~~~~~~~~~~~~~~~~~~
  472. Work on kconfig is welcomed on both areas of clarifying semantics and on
  473. evaluating the use of a full SAT solver for it. A full SAT solver can be
  474. desirable to enable more complex dependency mappings and / or queries,
  475. for instance on possible use case for a SAT solver could be that of handling
  476. the current known recursive dependency issues. It is not known if this would
  477. address such issues but such evaluation is desirable. If support for a full SAT
  478. solver proves too complex or that it cannot address recursive dependency issues
  479. Kconfig should have at least clear and well defined semantics which also
  480. addresses and documents limitations or requirements such as the ones dealing
  481. with recursive dependencies.
  482. Further work on both of these areas is welcomed on Kconfig. We elaborate
  483. on both of these in the next two subsections.
  484. Semantics of Kconfig
  485. ~~~~~~~~~~~~~~~~~~~~
  486. The use of Kconfig is broad, Linux is now only one of Kconfig's users:
  487. one study has completed a broad analysis of Kconfig use in 12 projects [0].
  488. Despite its widespread use, and although this document does a reasonable job
  489. in documenting basic Kconfig syntax a more precise definition of Kconfig
  490. semantics is welcomed. One project deduced Kconfig semantics through
  491. the use of the xconfig configurator [1]. Work should be done to confirm if
  492. the deduced semantics matches our intended Kconfig design goals.
  493. Having well defined semantics can be useful for tools for practical
  494. evaluation of depenencies, for instance one such use known case was work to
  495. express in boolean abstraction of the inferred semantics of Kconfig to
  496. translate Kconfig logic into boolean formulas and run a SAT solver on this to
  497. find dead code / features (always inactive), 114 dead features were found in
  498. Linux using this methodology [1] (Section 8: Threats to validity).
  499. Confirming this could prove useful as Kconfig stands as one of the the leading
  500. industrial variability modeling languages [1] [2]. Its study would help
  501. evaluate practical uses of such languages, their use was only theoretical
  502. and real world requirements were not well understood. As it stands though
  503. only reverse engineering techniques have been used to deduce semantics from
  504. variability modeling languages such as Kconfig [3].
  505. [0] http://www.eng.uwaterloo.ca/~shshe/kconfig_semantics.pdf
  506. [1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf
  507. [2] http://gsd.uwaterloo.ca/sites/default/files/ase241-berger_0.pdf
  508. [3] http://gsd.uwaterloo.ca/sites/default/files/icse2011.pdf
  509. Full SAT solver for Kconfig
  510. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  511. Although SAT solvers [0] haven't yet been used by Kconfig directly, as noted in
  512. the previous subsection, work has been done however to express in boolean
  513. abstraction the inferred semantics of Kconfig to translate Kconfig logic into
  514. boolean formulas and run a SAT solver on it [1]. Another known related project
  515. is CADOS [2] (former VAMOS [3]) and the tools, mainly undertaker [4], which has
  516. been introduced first with [5]. The basic concept of undertaker is to exract
  517. variability models from Kconfig, and put them together with a propositional
  518. formula extracted from CPP #ifdefs and build-rules into a SAT solver in order
  519. to find dead code, dead files, and dead symbols. If using a SAT solver is
  520. desirable on Kconfig one approach would be to evaluate repurposing such efforts
  521. somehow on Kconfig. There is enough interest from mentors of existing projects
  522. to not only help advise how to integrate this work upstream but also help
  523. maintain it long term. Interested developers should visit:
  524. http://kernelnewbies.org/KernelProjects/kconfig-sat
  525. [0] http://www.cs.cornell.edu/~sabhar/chapters/SATSolvers-KR-Handbook.pdf
  526. [1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf
  527. [2] https://cados.cs.fau.de
  528. [3] https://vamos.cs.fau.de
  529. [4] https://undertaker.cs.fau.de
  530. [5] https://www4.cs.fau.de/Publications/2011/tartler_11_eurosys.pdf