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

Add Kconfig support #2374

Merged
merged 10 commits into from
Sep 29, 2021
Merged

Add Kconfig support #2374

merged 10 commits into from
Sep 29, 2021

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Sep 26, 2021

This PR introduces the menuconfig build target as per Slaff's idea in #1712 (comment).

Sming configuration does not fully comply with Kconfig spec. For example, boolean values in Sming are typically '1', '0' or undefined but Kconfig requires them to be 'y' or 'n'. A small python program handles this conversion and merging Kconfig settings into the cached configuration data.

The current set of Kconfig files aren't complete but these can be added as required.

@mikee47 mikee47 changed the title Add Kconfig support [WIP] Add Kconfig support Sep 26, 2021
@mikee47
Copy link
Contributor Author

mikee47 commented Sep 26, 2021

Got the rough bones of this working, but choices need sorting out. For example, cannot set the DEBUG_VERBOSE_LEVEL value directly but need to work out which of the appropriate SELECT_DEBUG_n values corresponds.

@mikee47 mikee47 force-pushed the feature/kconfig branch 2 times, most recently from a602602 to 8c36a49 Compare September 27, 2021 13:09
@mikee47 mikee47 changed the title [WIP] Add Kconfig support Add Kconfig support Sep 27, 2021
@mikee47
Copy link
Contributor Author

mikee47 commented Sep 27, 2021

OK, seems to be working.

Add cfgtool to convert between formats
Fix use of `SPIFF_FILEDESC_COUNT`
Cannot set `CONFIG_BOOTLOADER_LOG_LEVEL` directly, only through choice variables
@slaff slaff added this to the 4.5.0 milestone Sep 27, 2021
@slaff
Copy link
Contributor

slaff commented Sep 28, 2021

@mikee47 This PR so far looks great to me! Gradually we should add more visually configurable options to components, like for example SSL options and so on, but this can happen also in other PRs. Apart from fixing the codacy issues do you plan to add some more changes to this PR?

@mikee47 mikee47 force-pushed the feature/kconfig branch 2 times, most recently from 0d68426 to 09a96cf Compare September 28, 2021 19:09
@mikee47
Copy link
Contributor Author

mikee47 commented Sep 28, 2021

@slaff Tried and failed to resolve "No whitespaces allowed surrounding docstring text (D210)". (Looks like it's failed to pick up forced changes.)

Also added fix so this works on Windows (paths issues). That should be all for now.

Generate `kconfig.in` file using cfgtool, fix paths as required
(e.g. "/s/path/to" -> "s:/path/to")
@slaff slaff removed the 3 - Review label Sep 29, 2021
@slaff slaff merged commit 97aa2cd into SmingHub:develop Sep 29, 2021
@slaff slaff mentioned this pull request Sep 29, 2021
5 tasks
@mikee47 mikee47 deleted the feature/kconfig branch September 29, 2021 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants