Open
Conversation
Projects such as Zephyr OS have a module system, where Kconfig files can
exist in multiple directories that are effectively merged together by the
build system. In other words, one project directory can refer to
subdir/Kconfig where subdir/ is actually in another project directory.
As an example:
zephyr/ - main source directory
Kconfig - main Kconfig file
module/ec - module directory
motion/ - motion subsystem
Kconfig - Kconfig file for motion subsystem
Wtih the above, we might have, in zephyr/Kconfig:
source "motion/Kconfig"
and it automatically locates the file in the module/ec directory.
Add support for this, by allowing a list of search paths to be supplied to
Kconfiglib.
Signed-off-by: Simon Glass <sjg@chromium.org>
When parsing Kconfig which include macros it is currently necessary to provide a value for all macros in advance. This may not be possible in some cases, e.g. when the caller is performing checks on the Kconfig options but is not running a full build of the project. Add an option to support this. This allows parsing of Zephyr Kconfig files without specifying a particular board, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
sjg20
added a commit
to sjg20/zephyr
that referenced
this pull request
Jan 28, 2022
When parsing Kconfig which include macros it is currently necessary to provide a value for all macros in advance. This may not be possible in some cases, e.g. when the caller is performing checks on the Kconfig options but is not running a full build of the project. Add an option to support this. This allows parsing of Zephyr Kconfig files without specifying a particular board, etc. This corresponds to upstream PR: ulfalizer/Kconfiglib#112 but it looks like the project might be dead as there is no activity in 18 months. Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Icf36da1e47fb7293f3d8bc3569affd7cd7598100
coreboot-bot
pushed a commit
to coreboot/chrome-ec
that referenced
this pull request
Jan 28, 2022
Add some changes to allow this library to work with Zephyr: - Ability to have Kconfig files in multiple projects directories - Ability to ignore variable expansion failures, since there are so many Kconfig variables in Zephyr These changes have been sent upstream here: ulfalizer/Kconfiglib#112 and to Zephyr here: zephyrproject-rtos/zephyr#42233 so this also includes the one Zephyr-local commit: 66d1b3ce106 kconfig: kconfiglib.py: Backup files only All three commits are based on Kconfiglib 14.1.0 BUG=b:181323955 BRANCH=none TEST=python3 util/test_kconfig_check.py Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iac24a90fe3707cacab40d45210addc663bb17f60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390708 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
jeremybettis
approved these changes
Jul 12, 2022
1 task
|
Rather unfortunately, it appears the original author of Kconfiglib disappeared. The Zephyr project has been granted ownership of the PyPI package via PEP-541 request, and I'm going to do a release based on a new repository in the ➡️ Action required: @sjg20 Are you able to re-open your pull request on the new repository? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are a few useful features I needed with working with Zephyr OS.