-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Note that this is now one of the tasks listed in #8499.
The list of sub-tasks in this particular tasks, from my conversations (@SebastianBoe feel free to add others here):
- Modifying the CMake build system so that DT is processed before Kconfig
- Defining a template of Kconfig option that DT can generate so that Kconfig options can depend on. i.e. DT creates and enables
CONFIG_HAS_HW_SPIand Kconfig depends on it forCONFIG_SPI - Define and implement the interaction of DT with the build system in general
- Remove all references to Kconfig symbols from DTS
Original description:
How your SW is configured and what SW is available is dependent on what your HW looks like. It is not the other way around, that your board's HW description depends on what kind of SW you want.
Therefore we need to move DTS processing from after Kconfig to before Kconfig. This requires a lot of effort and will break all manner of things. But I believe it will result in a simpler and better integrated configuration system in the end.
A configuration architecture that this would enable (if we also start feeding DTS information into Kconfig somehow):
Use DTS to express what HW is present and feed this immutable information into Kconfig.
Use a (HW-support pruned) Kconfig tree to express that the user can enable and configure SW according to the immutable constraints of the HW.
The idea of feeding HW-information into Kconfig is not new. It is currently being done with BOARD and ARCH. This proposal simply extends the amount of HW information that is imported to take greater advantage of DTS information. When DTS information is only available after all SW configuration has completed it's usefulness in the configuration system is very minimal.