Skip to content
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

Kconfig.defconfig is undocumented and unclear #7159

Closed
ulfalizer opened this issue Apr 23, 2018 · 3 comments
Closed

Kconfig.defconfig is undocumented and unclear #7159

ulfalizer opened this issue Apr 23, 2018 · 3 comments
Assignees
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug

Comments

@ulfalizer
Copy link
Collaborator

ulfalizer commented Apr 23, 2018

Kconfig.defconfig files were mysterious to me, meaning they're probably super mysterious to people who are less used to Kconfig. They ought to be documented, both to make the design clearer, and to prevent people from putting stuff in random places.

The prefer-later-defaults behavior (see #7054) could be documented at the same time.

Here's an overview of what I think the thinking behind those files is, taken from #6890 (comment):

  1. Boards have some fixed setting/symbol X.

  2. If a user picks a particular board, they shouldn't be able to change X in e.g. menuconfig, so X has no prompt.

  3. Since X has no prompt, it can't be assigned its board-specific value via a .config (*_defconfig in this case) file.

  4. X still needs to get its board-specific value somehow though, and that's what those Kconfig.defconfig files are for. You could have a single symbol definition with all the defaults too, but it would get spammy.

@ulfalizer
Copy link
Collaborator Author

CC @carlescufi

@MaureenHelm MaureenHelm added Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug area: Documentation labels Apr 24, 2018
@SebastianBoe
Copy link
Collaborator

I don't know what the design behind Kconfig.defconfig is either.

But one would think that the use-case for having board-specific immutable/fixed configs should be covered by DTS and then input to Kconfig like ARCH is.

@carlescufi
Copy link
Member

Agreed, these files are a mystery. I've assigned you to this @ulfalizer so you can document them.

ulfalizer added a commit to ulfalizer/zephyr that referenced this issue Apr 26, 2018
In particular, try to demystify Kconfig.defconfig files, and provide
guidelines on whether configuration settings should go in
BOARD_defconfig or Kconfig.defconfig.

The board porting section seems to be the most relevant one here, so put
the documentation there, with some "see also" links from elsewhere.
Things could be reorganized later if needed.

Give a general overview of visible and invisible Kconfig symbols as
well, as that ties in with the configuration scheme.

This is reverse-engineering on my part. The configuration scheme doesn't
seem to be documented anywhere prior.

Fixes: zephyrproject-rtos#7159

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
carlescufi pushed a commit that referenced this issue Apr 27, 2018
In particular, try to demystify Kconfig.defconfig files, and provide
guidelines on whether configuration settings should go in
BOARD_defconfig or Kconfig.defconfig.

The board porting section seems to be the most relevant one here, so put
the documentation there, with some "see also" links from elsewhere.
Things could be reorganized later if needed.

Give a general overview of visible and invisible Kconfig symbols as
well, as that ties in with the configuration scheme.

This is reverse-engineering on my part. The configuration scheme doesn't
seem to be documented anywhere prior.

Fixes: #7159

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants