kconfig-language.rst (c613583b6a87434123fc6714acbec6522859185e) | kconfig-language.rst (18084e435ff6e47197542db6bab98bafaa4c7b68) |
---|---|
1================ 2Kconfig Language 3================ 4 5Introduction 6------------ 7 8The configuration database is a collection of configuration options --- 550 unchanged lines hidden (view full) --- 559symbol can still be compiled if the dependency is not met, it is encouraged to 560increase build coverage by adding an "|| COMPILE_TEST" clause to the 561dependency. This is especially useful for drivers for more exotic hardware, as 562it allows continuous-integration systems to compile-test the code on a more 563common system, and detect bugs that way. 564Note that compile-tested code should avoid crashing when run on a system where 565the dependency is not met. 566 | 1================ 2Kconfig Language 3================ 4 5Introduction 6------------ 7 8The configuration database is a collection of configuration options --- 550 unchanged lines hidden (view full) --- 559symbol can still be compiled if the dependency is not met, it is encouraged to 560increase build coverage by adding an "|| COMPILE_TEST" clause to the 561dependency. This is especially useful for drivers for more exotic hardware, as 562it allows continuous-integration systems to compile-test the code on a more 563common system, and detect bugs that way. 564Note that compile-tested code should avoid crashing when run on a system where 565the dependency is not met. 566 |
567Architecture and platform dependencies 568~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 569Due to the presence of stubs, most drivers can now be compiled on most 570architectures. However, this does not mean it makes sense to have all drivers 571available everywhere, as the actual hardware may only exist on specific 572architectures and platforms. This is especially true for on-SoC IP cores, 573which may be limited to a specific vendor or SoC family. 574 575To prevent asking the user about drivers that cannot be used on the system(s) 576the user is compiling a kernel for, and if it makes sense, config symbols 577controlling the compilation of a driver should contain proper dependencies, 578limiting the visibility of the symbol to (a superset of) the platform(s) the 579driver can be used on. The dependency can be an architecture (e.g. ARM) or 580platform (e.g. ARCH_OMAP4) dependency. This makes life simpler not only for 581distro config owners, but also for every single developer or user who 582configures a kernel. 583 584Such a dependency can be relaxed by combining it with the compile-testing rule 585above, leading to: 586 587 config FOO 588 bool "Support for foo hardware" 589 depends on ARCH_FOO_VENDOR || COMPILE_TEST 590 |
|
567Kconfig recursive dependency limitations 568~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 569 570If you've hit the Kconfig error: "recursive dependency detected" you've run 571into a recursive dependency issue with Kconfig, a recursive dependency can be 572summarized as a circular dependency. The kconfig tools need to ensure that 573Kconfig files comply with specified configuration requirements. In order to do 574that kconfig must determine the values that are possible for all Kconfig --- 157 unchanged lines hidden --- | 591Kconfig recursive dependency limitations 592~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 593 594If you've hit the Kconfig error: "recursive dependency detected" you've run 595into a recursive dependency issue with Kconfig, a recursive dependency can be 596summarized as a circular dependency. The kconfig tools need to ensure that 597Kconfig files comply with specified configuration requirements. In order to do 598that kconfig must determine the values that are possible for all Kconfig --- 157 unchanged lines hidden --- |