-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards: set CONFIG_BOARD default based on devicetree #49260
Conversation
Add "model" property to base.yaml as its a standard property defined by the devicetree spec. Being a simple standard property, add it to the list of properties that are automatically handled. Signed-off-by: Kumar Gala <galak@kernel.org>
Add function to return a string property value and "" under all other conditions. Signed-off-by: Kumar Gala <galak@kernel.org>
Set the default value of CONFIG_BOARD bases on root node "model" property in devicetree. Signed-off-by: Kumar Gala <galak@kernel.org>
Make <BOARD_DIR>/Kconfig.defconfig optional since for some boards the only thing <BOARD_DIR>/Kconfig.defconfig is doing is setting the default value for CONFIG_BOARD. Its reasonable that now the default can be set from devicetree from the root level "model" property and thus boards don't need to specify a Kconfig.default. Signed-off-by: Kumar Gala <galak@kernel.org>
c05c2fd
to
fcec500
Compare
This is cool, but makes some problems we have worse. @tejlmand and I have been talking about how it's a problem that CONFIG_BOARD in Kconfig doesn't have to match BOARD in CMake. You see this most often in Arm v8-M boards with trustzone, where |
Agree with @mbolivar-nordic. The principle is cool, but makes inconsistency worse. Already now it's For example enabling a netcore image, such as HCI RPMsg, when building on a nRF5340, but not other boards. See also: #43488 And sysbuild is not (yet) using devicetree, so sourcing information from there makes things more complex. |
@mbolivar-nordic @tejlmand so why don't we effectively add -DCONFIG_BOARD= to set this to match and remove the Kconfig.defconfig setting of CONFIG_BOARD? |
model: | ||
type: string | ||
required: false | ||
description: specifies the manufacturer’s model number of the device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/number/name
I don't get what you mean, sorry. |
I mean if CONFIG_BOARD is suppose to match the cmake -DBOARD, why don't we enforce/pass that through from Cmake to Kconfig. Instead of having CONFIG_BOARD set in Kconfig files? |
work has been taken up by @nordicjm on this, if curious, see this commit for details: ab05d91 |
This commit isn't helpful; do you have a branch pointer? |
@mbolivar-nordic github is playing tricks here. 👿
which includes the PR number 50154, which is why I posted the link like that. |
No description provided.