Commit graph

6,501 commits

Author SHA1 Message Date
Anas Nashif
dbabd7fc63 ci: test_plan: remove references to sample.yaml
Remove more references to sample.yaml, still support it for a while.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-03 19:22:54 -04:00
Shankar Ramasamy
5240b88539 scripts: twister: removed deprecated cmsis_dap_serial argument
Clean up Twister OpenOCD runner by removing
deprecated cmsis_dap_serial argument and
replacing with adapter serial

Signed-off-by: Shankar Ramasamy <shankar.ramasamy@microchip.com>
2026-07-03 13:55:57 +02:00
Jordan Yates
81f8fe3cae scripts: twisterlib: coverage: output processing time
Processing the raw coverage data into the output `html` can take a
significant amount of time. Add a display for the duration, similar to
the timers for building the testsuite list and test build/execute times.

Example output:
```
INFO    - Built testsuite list in 0.04 seconds
...
INFO    - 16 of 16 executed test configurations passed (100.00%), 0 \
          built (not run), 0 failed, 0 errored, with no warnings in \
          25.85 seconds.
...
INFO    - Coverage data processed in 11.45 seconds
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-07-03 13:54:29 +02:00
Jamie McCrae
678d76a74b scripts: list_hardware: Allow listing SoC series and family
These fields should be able to be listed if the user/calling
process wants them

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-03 05:43:02 -04:00
Jamie McCrae
c21a31eaea scripts: list_hardware: FIx missing support for limiting results
Fixing missing support for --soc, --soc-family and --soc-series
arguments, which previously would just return all SoCs irrespective
of what was wanted

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-03 05:43:02 -04:00
Grzegorz Chwierut
e90f7ae25e twister: use suite id as testsuites registry key
Use suite id instead of name as the key in the testsuites
registry. With --detailed-test-id enabled, the suite name
includes the path, which caused a false duplicate error when a
required application was passed via -T on the command line and
was also listed in the required_application section of another
test.

Duplicated scenarios are reported as an error regardless of
whether --detailed-test-id is used.

Update the twister unit tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-07-03 05:33:44 -04:00
Jamie McCrae
961b7a8019 cmake: yaml: Switch to JSON schema
Moves from the deprecated pykwalify to JSON schema

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-02 13:02:57 +01:00
Benjamin Cabé
9c9d29b79e scripts: zspdx: capture compile options and build environment
Enrich the Build profile with per-target compile flags and defines and
the key build inputs (board, arch, toolchain), mirroring the
Build-profile output of projects such as the Linux kernel.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-02 12:59:42 +01:00
Benjamin Cabé
5605da2f5b scripts: zspdx: emit the SPDX 3.0 Build profile
Emit the SPDX 3.0.1 Build profile, recording how the image and each
target was built. The profile is omitted when no build information is
available.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-02 12:59:42 +01:00
Benjamin Cabé
48e8804ec0 scripts: zspdx: collect build information for the SBOM graph
Gather the parsed toolchain, CMake file-API and per-target metadata
into the SBOM graph so serializers have the build details they need.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-02 12:59:42 +01:00
Benjamin Cabé
45ef9b7bc9 scripts: zspdx: parse CMake toolchains-v1 and CMake info
Parse the CMake file-API toolchains-v1 reply and cmake index object so
the SPDX 3.0 Build profile can describe the build toolchain.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-02 12:59:42 +01:00
Benjamin Cabé
6f39860931 scripts: zspdx: convert cmakefileapi classes to dataclasses
Replace the hand-written __init__ boilerplate in the CMake file-API
data classes with @dataclass field declarations, matching the style
already used elsewhere in zspdx (e.g. model.py). This makes the
module easier to extend with new data classes going forward.

No behavioral change: field defaults, __repr__ output, and the
zero-argument construction pattern used by cmakefileapijson.py are
all preserved.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-02 12:59:42 +01:00
Anas Nashif
c3a4efa51d scripts: checkpatch: recognize __aligned() in declarations
checkpatch reported a false-positive LINE_SPACING "Missing a blank line
after declarations" for local variables declared with __aligned(), e.g.:

	uint32_t eicr, embr, eicr_val;
	uint32_t __aligned(4) data32 = 0;

The LINE_SPACING heuristic decides whether a line is a declaration with
a regex that lets the type absorb trailing modifiers/attributes. But
__aligned was missing from the $Attribute list, so the type matched only
"uint32_t", $Ident then matched "__aligned", and the following "(" did
not match the expected [=,;:[] terminator. The line was therefore not
seen as a declaration and a blank line was demanded after the preceding
one.

Add __aligned to $Attribute, consuming its parenthesized argument
(including one level of nesting such as __aligned(sizeof(x))). This is
the root cause: __aligned(N) is now understood as a type attribute
everywhere, not only in the LINE_SPACING check.

Fixes #110417

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-01 17:05:11 -04:00
Guðni Már Gilbert
e68fdcfe32 scripts: dts: apply ruff format to gen_edt.py
Drop the script from .ruff-excludes.toml

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2026-07-01 14:32:29 -04:00
Anas Nashif
932effedd6 ci: set_assignees: add defer-to-other-areas file-group support
Add a new optional boolean field defer-to-other-areas to file-groups in
MAINTAINERS.yml.  When set to true it signals that the files in that
group are not the sole responsibility of the enclosing area: if another
area also covers the same files without the flag, that other area's
maintainer takes precedence as the PR assignee and the deferred area's
maintainers are added as reviewers instead.  When no non-deferred area
covers the files, the deferral has no effect and the area is used for
assignment as normal.

Typical use-case: the Clock Control subsystem owns generic driver
infrastructure under drivers/clock_control/, but a platform area also
covers the platform-specific files there.  The subsystem maintainer
adds those files to a deferred file-group so the platform maintainer
becomes the assignee while the subsystem maintainer is still notified
as a reviewer.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-01 14:32:11 -04:00
Jamie McCrae
0f07a53476 scripts: pylib: build_helpers: domains: Switch to JSON schema
Moves from the deprecated pykwalify to JSON schema

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-01 05:36:29 -04:00
Jamie McCrae
b836fcdd70 scripts: list_shields: Switch to JSON schema
Moves from the deprecated pykwalify to JSON schema

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-01 05:36:20 -04:00
Benjamin Cabé
3099022a3c scripts: zspdx: scope SPDX 3.0 relationships to their owner document
Ownership was decided while mutating the set it was tested against, so a
relationship's endpoints pulled in further relationships and the build
graph cascaded into every document. Decide ownership from a snapshot of
the document's own elements instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.8
2026-07-01 05:24:13 -04:00
Benjamin Cabé
edcf5fec0b scripts: zspdx: stop duplicating SPDX 3.0 relationships
Every relationship is also stored on its "from" element, so iterating the
graph-wide list in addition to components and files emitted each one
twice. Drop the redundant pass.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.8
2026-07-01 05:24:13 -04:00
Benjamin Cabé
b19c13b3f8 scripts: zspdx: speed up SPDX 3.0 element collection
Deduplicating against the output list with "not in" ran the model's deep
__eq__ for every comparison and dominated serialization time. Track the
gathered element IDs in a set and skip by ID instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.8
2026-07-01 05:24:13 -04:00
Emil Gydesen
2e9413f181 samples: Bluetooth: Move Audio samples to subdirectory
Move all LE Audio samples to their own subdirectory.

This makes it easier to find samples specific for LE Audio,
where there will be more coming.

This makes the samples directory follow the subsystem
and tests directory patterns as well.

This adds a place where LE Audio samples can place common
code, e.g. handling of LC3 and USB audio, without cluttering
the generic Bluetooth samples directory.

This makes it simpler to apply search patterns, such as the ones
in the MAINTAINERS file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-07-01 05:22:15 -04:00
Tomas Galbicka
b6fe144fb9 ipc: service: backends: add RPMSG-Lite backend
Add a new IPC service backend based on the RPMsg-Lite library.
The backend implements the ipc_service_backend ops (open, close,
register/deregister endpoint, send, send_nocopy, get/drop TX buffer,
hold/release RX buffer) on top of the RPMsg-Lite virtio transport.

A new DT binding (nxp,ipc-rpmsg-lite) is introduced to describe
each RPMsg-Lite link instance: shared memory region, role (host/remote),
link-id, MBOX channels, and per-instance buffer/priority tunables.
Multiple links share a single MBOX channel pair via the
notification-parent property; platform_notify() dispatches the
encoded vector_id to the correct link.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2026-07-01 05:20:27 -04:00
Jamie McCrae
c34d78d2dc scripts: Remove pykwalify parts
These are no longer needed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-06-30 18:24:12 -04:00
William Vinnicombe
dfbdca0e13 scripts: west: build: add fallback for srcrel to self.source_dir
On Windows, if the working directory and source directory are on different
drive letters, `os.path.relpath` will throw `ValueError: path is on mount
'D:', start on mount 'C:'`

This adds a fallback to use `self.source_dir` in that case, as `srcrel` is
only used in the printout of the checks below, so does not need to be
relative to the working directory

Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
2026-06-30 11:54:55 -04:00
Piotr Kosycarz
99c6f8af40 scripts: twister: handlers: handle nrf* runner dev-id
As there are multiple custom nrf* runners which needs dev-id,
handle them in general way for future.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2026-06-30 06:48:37 -04:00
Lucas Romero
fd407d213a lint: disable duplicate code check
for file that is intentionally a duplicate

Signed-off-by: Lucas Romero <lucas.romero@a-labs.io>
2026-06-30 06:47:37 -04:00
Lucas Romero
2efb7a1fba tests: update list of runners
to make tests succeed

Signed-off-by: Lucas Romero <lucas.romero@a-labs.io>
2026-06-30 06:47:37 -04:00
Lucas Romero
ebbffc9dda west: runners: add rtkprog
as an alternative flashing tool for realtek boards.
It is open source and cross-platform and available at the following
locations:
- https://github.com/a-labs-io/rtkprog
- https://pypi.org/project/rtkprog/

Signed-off-by: Lucas Romero <lucas.romero@a-labs.io>
2026-06-30 06:47:37 -04:00
Ryan McClelland
739f9edba9 counter: add devicetree reader macros
Add devicetree reader macros for counter capture. These include
an index for the channel number and default flags. These are
intended to eventually to be used within drivers for timestamp
capturing.

Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
2026-06-30 06:46:41 -04:00
Anas Nashif
4bfa037c3f scripts: tracing: add a console CTF trace viewer
Add scripts/tracing/trace_viewer.py, a dependency-free (Python 3 stdlib
only) viewer that renders a Zephyr CTF trace graphically on the console,
in the spirit of Trace Compass.

The viewer decodes the packed little-endian CTF records itself rather
than relying on babeltrace2. The per-event field layout is read from the
TSDL subsys/tracing/ctf/tsdl/metadata file (located by climbing the tree
from the script or via ZEPHYR_BASE), so the decoder tracks any events
added there; a small built-in table covers the core scheduling events so
the time graph still works when the metadata file is not found.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-29 22:18:05 -04:00
Pieter De Gendt
a9992bfb8b scripts: kconfig: Don't require a blank line between comment and if
A comment directly above a top-level 'if' documents the conditional
block, so anchor the required blank line before the comment rather than
between the comment and the 'if'.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude Code:claude-opus-4.8
2026-06-29 14:05:29 -05:00
Mathieu Choplain
d8b6648fb8 scripts: runners: pyocd: accept --no-load argument
Add support for the --load/--no-load argument in the pyOCD runner to
enable debugging using pyOCD without programming the target beforehand.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-29 13:59:31 -05:00
Zhixuan Jin
eaac153a15 scripts: runners: openocd: support -i/--dev-id for adapter selection
The openocd runner can already select a specific debug adapter by serial
number, but it did not advertise the dev_id capability. As a result the
common `west flash -i <serial>` form supported by every other runner failed
with "openocd doesn't support --dev-id option", which is confusing when
several identical adapters (e.g. CMSIS-DAP) are connected at once.

Declare dev_id=True and route the existing --serial option to the same
'dev_id' destination, following the pattern other runners used for this
migration. Both flags therefore land in args.dev_id (argparse handles
precedence), and the value is passed to the OpenOCD config as
_ZEPHYR_BOARD_SERIAL as before. --serial is kept as a deprecated alias and
documented in the migration guide; tests/test_openocd.py covers both forms.

Signed-off-by: Zhixuan Jin <me@zhixuan.dev>
2026-06-29 13:54:14 -05:00
Jamie McCrae
9197ece1e8 scripts/cmake: Add monitoring for dts bindings being changed
Generates a new file for use by the build system which lists all
the paths to dts bindings used in a build, then from CMake adds a
dependency to these files so that if they are modified, CMake will
re-run.

This has been implemented by adding support to edtlib to output
details on bindings and binding paths inside of the python code

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-06-29 11:28:16 +02:00
Henrik Brix Andersen
15cf3913b2 scripts: requirements: actions: refresh pinned versions
Run the uv command to update the pinned version in
requirements-actions.txt.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-06-26 13:02:39 -04:00
Martin Moya
f6b8a3ac31 twister: gtest: add failure reason when Gtest tests fail
Before this change, whenever a Gtest failed the runner failed reporting
that `instance.reason` was a `NoneType` and couldn't be concatenated
to string.

This PR fix that by adding a reason to the Gtest instance whenever
it failed. Additionally, it covers the edge case where Gtest
started but it has never finished executing the test

Signed-off-by: Martin Moya <moyamartin1@gmail.com>
2026-06-26 14:24:19 +01:00
Bill Waters
37923771bd scripts: twister: report unknown platform when loading a test plan
When loading a saved test plan with --load-tests/-F, get_platform()
returns None for any platform name in the file that is not part of the
current build. TestInstance() then dereferences platform.name and fails
with an opaque "AttributeError: 'NoneType' object has no attribute
'name'", which gives no hint about which entry is at fault.

Raise a TwisterRuntimeError that names the file, the unknown platform
and the test instead, so a stale or mismatched test plan is easy to
diagnose.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-06-26 07:46:37 -04:00
Shankar Ramasamy
8ad8e21b80 west: twister: enhancements to mplab_ipe runner
- fix mplab_ipe runner to use the board by serial number
- fix twister handler to pass dev_id to mplab_ipe runner
- fix map file generation to include MPLAB boards

Signed-off-by: Shankar Ramasamy <shankar.ramasamy@microchip.com>
2026-06-26 07:45:37 -04:00
Appana Durga Kedareswara rao
8f9860f660 scripts: coredump: add UDP receiver; fix gdbserver pipe teardown
Add coredump_udp_receiver.py to reassemble ZCDU-framed UDP datagrams
sent by CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING_UDP into a raw .bin file
compatible with coredump_gdbserver.py. Supports IPv4 (--listen 0.0.0.0)
and IPv6 (--listen ::) with an idle-timeout to detect end-of-session
when the END datagram is lost.

Fix coredump_gdbserver.py: call gdbserver.close() only when not using
--pipe mode to avoid a double-close teardown error. Also clarify the
second positional argument as coredump_bin and document both the
serial-log-parser and UDP receiver workflows in the help text.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2026-06-25 22:18:57 +01:00
Fabio Baltieri
550ba56ddc ci: pr_metadata_check: pin pygithub
Pin the pygithub depdendency, keep the code scanning check happy. This
has to be done using a requirement file so that the automation can
update it with the other one so create a new requirements-actions-basic
just for this, it may come in handy for other workflows that don't need
the whole toolchain but just github api access.

Link: https://github.com/zephyrproject-rtos/zephyr/security/code-scanning/1102
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-06-25 22:17:26 +01:00
Pieter De Gendt
0a78b04519 scripts: ci: Add Kconfig formatting compliance check
Add a KconfigFormat check that runs scripts/kconfig/kconfig_style.py on
changed Kconfig files and reports the style issues on the touched lines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude Code:claude-opus-4.8
2026-06-25 15:25:02 +02:00
Pieter De Gendt
a3b078938c scripts: kconfig: Add style checker helper script
Add scripts/kconfig/kconfig_style.py, a dependency-free checker for the
Kconfig formatting rules from the style guidelines (line length,
indentation, blank lines, comment spacing and final newline).

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude Code:claude-opus-4.8
2026-06-25 15:25:02 +02:00
Benjamin Cabé
0ed493902c scripts: zspdx: adopt snake_case naming throughout
Rename functions, class attributes, and local variables from camelCase
to snake_case across the zspdx library and west spdx command. This is
a mechanical rename with no functional changes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-25 06:20:02 -04:00
David Nepožitek
daad7c59b8 scripts: zspdx: Fix encoding of SPDX 2 files
Explicitly open SPDX text output files with UTF-8 encoding to avoid
invalid UTF-8 content from platform-default encoding.

Signed-off-by: David Nepožitek <david@nepozitek.cz>
2026-06-24 14:00:04 -04:00
Pieter De Gendt
dcb1f49019 scripts: west_commands: Strip name and level from log forwarding
West itself adds ERROR/WARNING prefix, and does not print a (module) name.
Remove the logger class, the default already simply forwards the message.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-06-24 13:58:14 -04:00
Ioannis Damigos
af2909f001 west: runners: ezflashcli.py: Use flash_address_from_build_conf()
Use flash_address_from_build_conf() to find the offset for the
binary.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2026-06-24 07:38:58 -04:00
Anas Nashif
e836695cc8 scripts: fix various typos
Fix various typos under scripts/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-23 09:12:58 -04:00
Nicolas Pitre
97fac4b782 kernel: mmu: remove LINKER_USE_PINNED_SECTION and __pinned_* tagging
CONFIG_LINKER_USE_PINNED_SECTION is the second half of the selective
kernel-pinning model removed in issue #108773. With the kernel image
now always resident at boot (previous commit), the __pinned_*
attribute family is a no-op: every page they would have segregated is
already pinned by z_mem_manage_init()'s whole-image loop, so the
tagging contract neither adds safety nor remains maintainable.

Drop it.

Mechanical removals:

* All ~219 in-tree uses of __pinned_text, __pinned_rodata,
  __pinned_data, __pinned_bss, __pinned_noinit, and __pinned_func
  across arch/x86, drivers/interrupt_controller, drivers/timer,
  arch/common, kernel, lib/libc, subsys/portability/posix, tests, and
  the syscall code generator (scripts/build/gen_syscalls.py).

* The assembly aliases PINNED_TEXT/RODATA/DATA/BSS/NOINIT used in
  arch/x86/core/ia32/*.S and drivers/interrupt_controller/
  intc_loapic_spurious.S become plain TEXT/RODATA/DATA/BSS/NOINIT.

* K_KERNEL_PINNED_STACK_DEFINE, K_KERNEL_PINNED_STACK_ARRAY_DEFINE,
  K_KERNEL_PINNED_STACK_ARRAY_DECLARE, K_THREAD_PINNED_STACK_DEFINE,
  and K_THREAD_PINNED_STACK_ARRAY_DEFINE are removed. The few
  in-tree callers (kernel/init.c, arch/arm/core/cortex_a_r/smp.c,
  arch/arm64/core/fatal.c, arch/rx/core/prep_c.c,
  arch/x86/core/prep_c.c, kernel/include/kernel_internal.h,
  tests/bluetooth/hci_uart_async) move to the corresponding
  non-pinned macros.

Machinery removals:

* Kconfig.zephyr drops CONFIG_LINKER_USE_PINNED_SECTION.
  qemu_x86_tiny and qemu_x86_atom_virt drop their =y overrides.

* include/zephyr/linker/section_tags.h drops the __pinned_* macro
  definitions (both arms). __isr collapses to an empty macro since
  its only purpose was to alias __pinned_func.

* include/zephyr/linker/sections.h drops PINNED_TEXT_SECTION_NAME,
  PINNED_BSS_SECTION_NAME, etc. and the bare PINNED_TEXT/RODATA/etc.
  forwarders, plus the _APP_SMEM_PINNED_SECTION_NAME constant.

* include/zephyr/linker/linker-defs.h drops the lnkr_pinned_*
  externs, the _app_smem_pinned_* externs, and the lnkr_is_pinned()
  / lnkr_is_region_pinned() inline helpers.

* include/zephyr/linker/utils.h drops the lnkr_pinned_rodata branch
  in linker_is_in_rodata().

* include/zephyr/linker/app_smem_pinned{,_aligned,_unaligned}.ld
  are deleted; cmake/linker/ld/target_configure.cmake stops
  configuring them.

* boards/qemu/x86/qemu_x86_tiny.ld and
  include/zephyr/arch/x86/ia32/linker.ld drop their pinned-section
  blocks and the now-redundant #ifndef CONFIG_LINKER_USE_PINNED_SECTION
  conditionals throughout the body. The
  LIB_KERNEL_IN_SECT / LIB_ARCH_X86_IN_SECT / LIB_ZEPHYR_IN_SECT /
  LIB_C_IN_SECT / LIB_DRIVERS_IN_SECT / LIB_SUBSYS_LOGGING_IN_SECT /
  LIB_ZEPHYR_OBJECT_FILE_IN_SECT / ZEPHYR_KERNEL_FUNCS_IN_SECT macros
  in qemu_x86_tiny.ld are deleted; they existed only to feed the
  pinned text/rodata/data/bss/noinit sections.

* kernel/mmu.c drops the mark_linker_section_pinned(lnkr_pinned_start,
  ...) call. The mark_linker_section_pinned() helper survives but is
  now gated only on CONFIG_LINKER_USE_BOOT_SECTION.

* arch/common/init.c and include/zephyr/arch/common/init.h drop
  arch_bss_zero_pinned(); arch/x86/core/ia32/crt0.S drops the call
  to it.

* arch/x86/core/userspace.c drops the eager k_mem_page_in() of the
  thread's privileged stack on user-mode entry. With the kernel
  image fully resident the stack is already mapped.

* arch/x86/gen_mmu.py drops map_region("lnkr_pinned") and the
  set_region_perms() calls for lnkr_pinned_text / lnkr_pinned_rodata.

* CMakeLists.txt drops the LINKER_USE_PINNED_SECTION block that
  generated APP_SMEM_PINNED_* variables and the
  pinned_partitions target property feeding gen_app_partitions.py.
  cmake/modules/extensions.cmake removes the PINNED_RODATA /
  PINNED_RAM_SECTIONS / PINNED_DATA_SECTIONS zephyr_linker_sources()
  location keywords and their snippet files.
  scripts/build/gen_app_partitions.py drops --pinoutput /
  --pinpartitions arguments and the pinned-output branch.
  subsys/testsuite/coverage/CMakeLists.txt drops its
  CONFIG_DEMAND_PAGING-conditional fork.

* scripts/build/gen_kobject_list.py drops the
  app_smem_pinned_start / _end fallback for kobject placement
  validation.

* tests/arch/x86/pagetables and tests/kernel/mem_protect/userspace
  drop their lnkr_pinned_text / lnkr_pinned_rodata branches.

* include/zephyr/arch/x86/ia32/arch.h folds IRQSTUBS_TEXT_SECTION
  to the unconditional ".text.irqstubs" form.

* tests/subsys/llext/src/syscalls_ext.c drops a stale comment about
  syscalls landing in .pinned_text.

Targeted retentions:

* arch/x86/core/bootargs.c keeps multiboot_cmdline and efi_bootargs
  in .noinit (was __pinned_noinit, which decayed to __noinit when
  LINKER_USE_PINNED_SECTION was unset). The multiboot and zefi loader
  paths write these buffers before Zephyr's BSS-zero step, so
  zeroing them at boot loses the cmdline.

* arch/x86/core/ia32/fatal.c keeps _df_esf and _df_stack in .noinit.
  They are scratch space written by the double-fault handler and have
  no zero-init requirement; keeping them in .noinit also preserves
  the historical post-noinit alignment that gen_mmu.py relies on
  (z_mapped_size is computed before CMake-injected iterable sections
  are appended to the linker script, so the post-noinit page padding
  is what keeps those sections within the mapped region).

* include/zephyr/arch/x86/ia32/syscall.h and
  include/zephyr/arch/x86/arch.h wrap the per-arch
  arch_syscall_invoke* / arch_is_user_context / arch_k_cycle_get_*
  implementations in @cond INTERNAL_HIDDEN. The public Doxygen
  contract lives on the prototypes in
  include/zephyr/arch/arch_interface.h; the per-arch implementations
  are internal. Without this, removing the __pinned_func attribute
  exposes the implementations to the doxygen-coverage delta check
  as 10 newly-undocumented APIs.

Documentation updates are deferred to a separate commit.

Issue: #108773

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-06-23 09:11:08 -04:00
Benjamin Cabé
10b1b8bbb4 scripts: zspdx: add SPDX 3.0 generation support
Add an SPDX 3.0 (JSON-LD) serializer built on the spdx-python-model
package and wire it into makeSPDX, so that running west spdx with
--spdx-version 3.0 produces SPDX 3.0 output. One JSON-LD document is
written per SBOM document (app, zephyr, build, modules-deps); each
emits its packages, files and relationships and declares conformance
to the Core, Software and SimpleLicensing profiles.

- Add zspdx.serializers.spdx3.SPDX3Serializer.
- Register SPDX_VERSION_3_0 in the supported versions list.
- Add the spdx-python-model dependency.
- Add spdx3-validate and validate the generated SPDX 3.0 documents in
  the software_bill_of_materials test.
- Generalize the west spdx command description and document SPDX 3.0
  usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-23 05:34:30 -04:00
Benjamin Cabé
16166b2840 scripts: ci: refresh requirements-actions.txt pinned versions and SHAs
This commit refreshes the pinned versions and SHAs for the
requirements-actions.txt file.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-23 05:34:30 -04:00