ec3eff57e0
Up until now, Zephyr has patched Kconfig to use the last 'default' with a satisfied condition, instead of the first one. I'm not sure why the patch was added (it predates Kconfiglib), but I suspect it's related to Kconfig.defconfig files. There are at least three problems with the patch: 1. It's inconsistent with how Kconfig works in other projects, which might confuse newcomers. 2. Due to oversights, earlier 'range' properties are still preferred, as well as earlier 'default' properties on choices. In addition to being inconsistent, this makes it impossible to override 'range' properties and choice 'default' properties if the base definition of the symbol/choice already has 'range'/'default' properties. I've seen errors caused by the inconsistency, and I suspect there are more. 3. A fork of Kconfiglib that adds the patch needs to be maintained. Get rid of the patch and go back to standard Kconfig behavior, as follows: 1. Include the Kconfig.defconfig files first instead of last in Kconfig.zephyr. 2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of last in arch/Kconfig. 3. Include arch/<arch>/soc/*/Kconfig first instead of last in arch/<arch>/Kconfig. 4. Swap a few other 'source's to preserve behavior for some scattered symbols with multiple definitions. Swap 'source's in some no-op cases too, where it might match the intent. 5. Reverse the defaults on symbol definitions that have more than one default. Skip defaults that are mutually exclusive, e.g. where each default has an 'if <some board>' condition. They are already safe. 6. Remove the prefer-later-defaults patch from Kconfiglib. Testing was done with a Python script that lists all Kconfig symbols/choices with multiple defaults, along with a whitelist of fixed symbols. The script also verifies that there are no "unreachable" defaults hidden by defaults without conditions As an additional test, zephyr/.config was generated before and after the change for several samples and checked to be identical (after sorting). This commit includes some default-related cleanups as well: - Simplify some symbol definitions, e.g. where a default has 'if FOO' when the symbol already has 'depends on FOO'. - Remove some redundant 'default ""' for string symbols. This is the implicit default. Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and BT_L2CAP_TX_MTU (caused by confusing inconsistency). Piggyback some fixes for style nits too, e.g. unindented help texts. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> |
||
---|---|---|
.known-issues | ||
arch | ||
boards | ||
cmake | ||
doc | ||
drivers | ||
dts | ||
ext | ||
include | ||
kernel | ||
lib | ||
misc | ||
samples | ||
scripts | ||
subsys | ||
tests | ||
.checkpatch.conf | ||
.codecov.yml | ||
.gitattributes | ||
.gitignore | ||
.gitlint | ||
.mailmap | ||
.shippable.yml | ||
.uncrustify.cfg | ||
CMakeLists.txt | ||
CODEOWNERS | ||
CONTRIBUTING.rst | ||
Kconfig | ||
Kconfig.zephyr | ||
LICENSE | ||
Makefile | ||
README.rst | ||
VERSION | ||
version.h.in | ||
zephyr-env.cmd | ||
zephyr-env.sh |
.. raw:: html <a href="https://www.zephyrproject.org"> <p align="center"> <img src="doc/images/Zephyr-Project.png"> </p> </a> <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a> <img src="https://api.shippable.com/projects/58ffb2b8baa5e307002e1d79/badge?branch=master"> The Zephyr Project is a scalable real-time operating system (RTOS) supporting multiple hardware architectures, optimized for resource constrained devices, and built with security in mind. The Zephyr OS is based on a small-footprint kernel designed for use on resource-constrained systems: from simple embedded environmental sensors and LED wearables to sophisticated smart watches and IoT wireless gateways. The Zephyr kernel supports multiple architectures, including ARM Cortex-M, Intel x86, ARC, Nios II, Tensilica Xtensa, and RISC-V, and a large number of `supported boards`_. .. below included in doc/introduction/introduction.rst .. start_include_here Getting Started *************** To start developing Zephyr applications refer to the `Getting Started Guide`_ in the `Zephyr Documentation`_ pages. A brief introduction to Zephyr can be found in the `Zephyr Introduction`_ page. Community Support ***************** The Zephyr Project Developer Community includes developers from member organizations and the general community all joining in the development of software within the Zephyr Project. Members contribute and discuss ideas, submit bugs and bug fixes, and provide training. They also help those in need through the community's forums such as mailing lists and IRC channels. Anyone can join the developer community and the community is always willing to help its members and the User Community to get the most out of the Zephyr Project. Welcome to the Zephyr community! Resources ********* Here's a quick summary of resources to find your way around the Zephyr Project support systems: * **Zephyr Project Website**: The https://zephyrproject.org website is the central source of information about the Zephyr Project. On this site, you'll find background and current information about the project as well as all the relevant links to project material. * **Releases**: Source code for Zephyr kernel releases are available at https://zephyrproject.org/developers/#downloads. On this page, you'll find release information, and links to download or clone source code from our GitHub repository. You'll also find links for the Zephyr SDK, a moderated collection of tools and libraries used to develop your applications. * **Source Code in GitHub**: Zephyr Project source code is maintained on a public GitHub repository at https://github.com/zephyrproject-rtos/zephyr. You'll find information about getting access to the repository and how to contribute to the project in this `Contribution Guide`_ document. * **Samples Code**: In addition to the kernel source code, there are also many documented `Sample and Demo Code Examples`_ that can help show you how to use Zephyr services and subsystems. * **Documentation**: Extensive Project technical documentation is developed along with the Zephyr kernel itself, and can be found at http://docs.zephyrproject.org. Additional documentation is maintained in the `Zephyr GitHub wiki`_. * **Cross-reference**: Source code cross-reference for the Zephyr kernel and samples code is available at https://elixir.bootlin.com/zephyr/latest/source. * **Issue Reporting and Tracking**: Requirements and Issue tracking is done in the Github issues system: https://github.com/zephyrproject-rtos/zephyr/issues. You can browse through the reported issues and submit issues of your own. * **Security-related Issue Reporting and Tracking**: For security-related inquiries or reporting suspected security-related bugs in the Zephyr OS, please send email to vulnerabilities@zephyrproject.org. We will assess and fix flaws according to our security policy outlined in the Zephyr Project `Security Overview`_. Security related issue tracking is done in JIRA. The location of this JIRA is https://zephyrprojectsec.atlassian.net. * **Mailing List**: The `Zephyr Development mailing list`_ is perhaps the most convenient way to track developer discussions and to ask your own support questions to the Zephyr project community. There are also specific `Zephyr mailing list subgroups`_ for announcements, builds, marketing, and Technical Steering Committee notes, for example. You can read through the message archives to follow past posts and discussions, a good thing to do to discover more about the Zephyr project. * **IRC Chatting**: You can chat online with the Zephyr project developer community and other users in our IRC channel #zephyrproject on the freenode.net IRC server. You can use the http://webchat.freenode.net web client or use a client-side application such as pidgin. .. _supported boards: http://docs.zephyrproject.org/boards/boards.html .. _Zephyr Documentation: http://docs.zephyrproject.org .. _Zephyr Introduction: http://docs.zephyrproject.org/introduction/introducing_zephyr.html .. _Getting Started Guide: http://docs.zephyrproject.org/getting_started/getting_started.html .. _Contribution Guide: http://docs.zephyrproject.org/contribute/contribute_guidelines.html .. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki .. _Zephyr Development mailing list: https://lists.zephyrproject.org/g/devel .. _Zephyr mailing list subgroups: https://lists.zephyrproject.org/g/main/subgroups .. _Sample and Demo Code Examples: http://docs.zephyrproject.org/samples/samples.html .. _Security Overview: http://docs.zephyrproject.org/security/security-overview.html