1 # SPDX-License-Identifier: GPL-2.0
5 config GENERIC_BUILTIN_DTB
12 bool "Device Tree and Open Firmware support"
14 This option enables the device tree infrastructure.
15 It is automatically selected by platforms that need it or can
16 be enabled manually for unittests, overlays or
22 bool "Device Tree runtime unit tests"
23 depends on OF_EARLY_FLATTREE
27 This option builds in test cases for the device tree infrastructure
28 that are executed once at boot time, and the results dumped to the
31 This option should only be enabled for a development kernel. The tests
32 will taint the kernel with TAINT_TEST. The tests will cause ERROR and
33 WARNING messages to print on the console. The tests will cause stack
34 traces to print on the console. It is possible that the tests will
35 leave the devicetree in a corrupted state.
37 The unittest output will be verbose. Copy the output to a file
38 via capturing the console output or via the dmesg command. Process
39 this file with scripts/dtc/of_unittest_expect to reduce the
40 verbosity, test whether expected output is present, and to
41 summarize the results.
43 If unsure, say N here. This option is not safe to enable.
46 tristate "Devicetree KUnit Test" if !KUNIT_ALL_TESTS
48 default KUNIT_ALL_TESTS
50 This option builds KUnit unit tests for device tree infrastructure.
52 If unsure, say N here, but this option is safe to enable.
55 bool "Build all Device Tree Blobs"
56 depends on COMPILE_TEST
59 This option builds all possible Device Tree Blobs (DTBs) for the
62 If unsure, say N here, but this option is safe to enable.
70 config OF_EARLY_FLATTREE
71 def_bool OF && !(SPARC || ALPHA || HEXAGON || M68K || PARISC || S390)
72 select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM
81 # Hardly any platforms need this. It is safe to select, but only do so if you
84 bool "Support for dynamic device trees" if OF_UNITTEST
87 On some platforms, the device tree can be manipulated at runtime.
88 While this option is selected automatically on such platforms, you
89 can enable it manually to improve device tree unit test coverage.
93 depends on !SPARC && (HAS_IOMEM || UML)
97 depends on !SPARC && IRQ_DOMAIN
99 config OF_RESERVED_MEM
100 def_bool OF_EARLY_FLATTREE
106 bool "Device Tree overlays"
111 Overlays are a method to dynamically modify part of the kernel's
112 device tree with dynamically loaded data.
113 While this option is selected automatically when needed, you can
114 enable it manually to improve device tree unit test coverage.
116 config OF_OVERLAY_KUNIT_TEST
117 tristate "Device Tree overlay KUnit tests" if !KUNIT_ALL_TESTS
119 default KUNIT_ALL_TESTS
122 This option builds KUnit unit tests for the device tree overlay code.
124 If unsure, say N here, but this option is safe to enable.