Implement a check in the CI pipeline to enforce
that property names in device tree bindings do
not contain underscores.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fix build error when CONFIG_MCUX_COMPONENT_driver.fro_calib is set.
Error message:
modules/hal/nxp/mcux/mcux-sdk-ng/cmake/extension/function.cmake:2084 (if)
if given arguments:
"IN_LIST" "NEED_WRAP_TOOLCHAINS"
The error is because, mcux sdk ng cmake functions `mcux_add_xxx` support
add content based on toolchains. CMake should set current toolchain in
CMake Variable `CONFIG_TOOLCHAIN` to use this feature.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Adds BOOT_IMAGE_EXECUTABLE_RAM_START and BOOT_IMAGE_EXECUTABLE_RAM_SIZE
to the list of mcuboot symbols ignored by the compliance checking
script.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
#78615 Added a check for disallowed Kconfigs which does not work
on Windows machines. Windows machines seem to behave differently when
faced with the \b word boundary marker. I have removed the \b word
boundary marker from the grep commands when os.name=='nt'.
The script performs the same as before for any other os.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Add a compliance check that allows to flag when a given file requires a
Python version higher than 3.10 (minimum supported version in Zephyr at
the time of writing) since not all Python scripts are tested against
3.10 in CI and we want to avoid introducing changes that could break
users.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Automatically generate a boolean CONFIG_BOARD_REVISION_FOO=y Kconfig
option based on e.g. CONFIG_BOARD_REVISION="foo".
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Some NXP boards are using legacy SDK driver, such as S32K, K64, MIMX8Q,
and so on. The legacy SDK driver will not be updated, migrate to use
SDK NG driver.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Avoid the following exception in the Identity test when the commit body
is empty:
Traceback (most recent call last):
File "zephyr/scripts/ci/check_compliance.py", line 2053, in main
n_fails = _main(args)
^^^^^^^^^^^
File "zephyr/scripts/ci/check_compliance.py", line 1988, in _main
test.run()
File "zephyr/scripts/ci/check_compliance.py", line 1459, in run
auth_name, auth_email, body = git(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 2)
This is triggered because ``%b`` represents the body of the commit
message, which can be empty if there's a single line in it, because the
first line is considered the title.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The current implementation of the identity check fails if multiple DCO
signoff lines are present and the first instance of the signoff line
does not belong to the author of the commit. This patch proposes a solution
that allows patches with multiple DCO signoff lines to pass the identity
check, regardless of the order of the signoff lines.
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
This will implement a way of doing static initialization
the "IAR" way. This is done by calling __iar_data_init3
which handles all static initialization that is mentioned
in the linker file "initialize by copy".
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
Un-ignore diff and patch files for CheckPatch.
This was originally added to avoid throwing false-positives when diff
and patch files were actually in the repo, since it would incorrectly
try to perform code-formatting checks on those files instead of on
the content of the commit.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
BoardYml, DeviceTreeBindings, Kconfig, and KconfigBasic checks
can be run with a decentralized west manifest.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Currently, only MCUBOOT_LOG_LEVEL_INF and MCUBOOT_LOG_LEVEL_WRN
are allowed in UNDEF_KCONFIG_ALLOWLIST. Let's allow
MCUBOOT_LOG_LEVEL_DBG as well, since some use cases may require
this level of scrutiny.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Was getting several false positives about whitespace at line
endings with check_compliance.py because it was analyzing
.patch and .diff files as source.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Adds board hooks to the disallowed defconfig symbol list as
these should be selected, not put in a defconfig
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Use the --format flag in git rather than parsing the output of
the git log. The inspiration for this change was that the previous
implementation breaks if there's a ~/.gitconfig that changes the
git log format.
Signed-off-by: John Barbero Unenge <git@lsrkttn.com>
Adds some Kconfigs to the allow list which are used for
demonstration purposes in sysbuild documentation
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes using the wrong path for checking if disallowed Kconfigs
are present, to use the zephyr base instead of the git top level
folder which caused issues for downstream manifests
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit adds a test that checks if disconnecting
and restarting the IPC session works correctly. The
test is also focused on the "unbound" callback.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
Co-authored-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Adds a check for Kconfig settings that are disallowed from being
used in defconfig files (because it is the complete wrong place
for them), with the default entry being PINCTRL
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add an if clause to the CheckPatch Class that checks for windows os.
If windows os, check for perl installation.
If no perl installation present. Fail the check.
Without this change, CheckPatch can fail silently on windows,
as windows does not have a way to run perl scripts.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Introduce sysbuild-specific variants of existing Kconfig checks:
* SysbuildKconfig
* SysbuildKconfigBasic
* SysbuildKconfigBasicNoModules
This involves a few additions to the base `KconfigCheck` class:
* Supporting a variable symbol prefix, to handle `SB_CONFIG_`.
* Generating extra files, including `Kconfig.sysbuild.modules`.
Although these are never sourced outside of sysbuild Kconfig,
they're still generated for every regular Zephyr build, so it's
natural to let all Kconfig checks follow this behavior.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The KCONFIG_BINARY_DIR/{boards,soc,arch}/ directories are only relevant
for `KconfigCheck.get_v2_model()`, so generate them within this method.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
HWMv1-specific Kconfig checks were meant to be removed before HWMv2 was
merged into `main` (see `collab-hwm` history), but some traces remained.
Do another round of cleanup.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
So far, the behavior of different Kconfig checks has been parametrized
using the `run()` method, and every new check has introduced with it a
new argument to that method.
It's possible to replace each `run()` argument by way of overriding
different class methods and making better use of inheritance:
free=False Stub check_no_undef_outside_kconfig()
no_modules=True Stub get_modules()
filename Introduce class member FILENAME
hwm (unused)
This should establish a more scalable and straightforward pattern for
adding future Kconfig checks. It also favors composability, which will
come in handy when implementing checks for sysbuild Kconfig.
Additionally, avoid duplicating `doc` and `path_hint` in every subclass.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
When looking at git author in a commit range using git log, explicitly
indicate we don't want to use the mailmap file (default git client
behavior is to use it), so that the "actual" author info from the commit
is used to perform the compliance check, and not whatever identity the
author may have mapped to in the mailmap file (ex. their "main" email
address might be different from the one they used to commit).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There's no need for the CODEOWNERS file anymore as figuring out
maintainership and performing reviewer assignment is done via the
MAINTAINERS file now
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When a given board or SoC is extended, it has more than one directory
associated with it, where the build system can look for Kconfig files.
Make sure all of them are also included for Kconfig compliance checks.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The python subprocess call had a stdout=subprocess.PIPE parameter that
redirects standard output to a pipe, and a stderr=subprocess.STDOUT
parameter that redirected stderr to the pipe. This mixed JSON and
non-JSON output together, and issued an exception. Fixing with
stderr=subprocess.DEVNULL to ignore standard error and only keep the
JSON output.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add a compliance test using ruff, for both linting and formatting of
newly added python files.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Reporting or annotating issues can be done on a range rather than a
single line.
Add support for end line and end column.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
To support checking for sorted blocks of multi-line text add
an optional regex pattern for the KeepSorted compliance check.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Fixes: #69548
Support extending an existing board with new board variants.
This commit introduces the following changes to allow a board to be
extended out-of-tree.
The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.
A board 'plank' can be extended like this:
> board:
> extend: plank
> variants:
> - name: ext
> qualifier: soc1
For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The script was only looking at the Zephyr base repository and failing to
look for soc roots e.g. in other modules.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
With the requirement in #78316 for Zephyr modules to always define
ZEPHYR_<name>_MODULE Kconfig setting then there is no longer a need
for this commit. Simplify check_compliance by reverting ths commit.
This reverts commit 35e28e6315.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
ReStructuredText can sometimes be tricky to get right, especially for
folks that might be more familiar with Markdown.
This adds a Sphinx/RST linter to the compliance check script to help
catch common issues that can easily go unnoticed and cause rendering
issues.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>