Commit Graph

103127 Commits

Author SHA1 Message Date
Luca Burelli 11c350e2e6 llext: fix handling of unimplemented syscalls
When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.

This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.

This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.

The test for this functionality is also updated to reflect the change.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-08 16:59:50 +02:00
Chaitanya Tata e2e96acebf drivers: nrfwifi: Fix rebuilding when FW blobs are changes
Whenever FW blobs are updated manually, we need to tell cmake to
auto-build the source files to use the latest firmware without doing a
pristine build.

This adds a custom target to be run with nRF Wi-Fi driver and updates
timestamp of fw_load.c to rebuild whenevr the blob is updated.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata d15b7b5b3a drivers: wifi: nrf: Remove unused linker script
This script is needed only when external flash is used to store nRF70
firmware patches. This also uses PM which is supported only in NCS.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata f20e2d68b0 drivers: wifi: Add support to override FW load
For using external flash the tooling is only available in NCS, so, use
the existing Kconfig option to override the FW loading.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata 3cd4700132 drivers: nrfwifi: Fix the indentation
The Cmake indentation is two spaces.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Robert Lubos c6cc87c526 log: net: Fix build warning with IPv6 disabled
Building the net logger backend with IPv4 only gives the following
warning:

log_backend_net.c:116:31: warning: array subscript 'struct sockaddr[0]'
is partly outside array bounds of 'struct sockaddr_in[1]'
[-Warray-bounds] local_addr->sa_family = server_addr.sa_family;

hence assign the address family directly to sockaddr_in/6 structs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos 7d91281caa samples: net: telnet: Remove redundant code
The sample uses net_config library, so there's no need for the sample to
configure unicast IP addresses manually.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos 5c6b003554 net: dns: dispatcher: Don't use uninitialized entries
In case CONFIG_DNS_RESOLVER_MAX_SERVERS is larger than the actual number
of DNS servers configured, some server entries may be left
uninitialized. The dispatcher needs to take this into account, otherwise
it may cause memory corruptions.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos 7b854d8260 samples: net: echo_client: Fix 'Tag name should be unique' error
Refactor the code to comply with:
  Violation to rule 5.7 (Tag name should be unique) tag: data

Rename the structure to avoid excessive refactoring.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos 0623b23f71 samples: net: echo_client: Fix build warning with IPv6 disabled
Building the sample with IPv4 only gives the following warning:

tcp.c:99:37: warning: array subscript 'struct sockaddr[0]' is partly
outside array bounds of 'struct sockaddr_in[1]' [-Warray-bounds]
  data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);

This doesn't really seem like a valid one, but to get rid of it
workaround by specifying address family explicitly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos fd2fa54aa7 samples: net: Add Wi-Fi snippet support for networking samples
Make use of wifi-ipv4 snippet in several networking samples.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos 0fdfad84de snippets: Add Wi-Fi IPv4 snippet
Introduce a snippet for configuring IPv4 over Wi-Fi support in
networking samples.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Emil Gydesen b2e61ef355 Bluetooth: BAP: Fix bad check in bt_audio_valid_qos_pref
The checks did not properly take into account
that the pref_pd_min and pref_pd_max could have valid
0 values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-08 16:58:09 +02:00
Krzysztof Chruściński 8fc0aba4ae logging: Add log_source_id helper function
There are many places where source_id is retrieved and it
depends on runtime filtering being enabled. So far it was
all exposed but lets encapsulate that into a helper function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-08 16:57:59 +02:00
Pisit Sawangvonganan 88374b0738 fs: nvs: streamline `rc` return logic
Streamline the `rc` return logic in `nvs_flash_wrt_entry()`, `nvs_gc()`
by directly returning `rc`, as the redundant conditional check and
explicit return of 0 were unnecessary.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-08 16:57:49 +02:00
Ioannis Damigos 6c6a1e550c da1469x: Remove CONFIG_PINCTRL from all defconfig files
Remove CONFIG_PINCTRL from all defconfig files.

Fixes #78619

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-08 16:57:41 +02:00
Anas Nashif 621da32340 MAINTAINER: add board/hardware scripts into build system area
Add board/hardware scripts and schema used by build system to relevant
areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Anas Nashif 55489f5787 boards: qemu_x86: add board description
Use the description field for the full name/description of the boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Anas Nashif 50ffc771bf boards: add board full_name field
Full name or description of a board is something we are missing in
HWVv2. It is right now being added to yaml files parsed by twister. This
should be generically available to tooling and documentation
independently from twister.

As we rework how twister parses board meta-data (#77250) and how we
generate board documentation (#79160), this becomes neceassry.

Moving the board full name/description from the twister yaml files to
the board.yaml is something we can automate once the schema is agreed
upon.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Raffael Rostagno a7d6565f55 tests: wifi: esp32: ICMP check improvement
Improve ICMP check by adding retry feature and data check.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-08 16:57:27 +02:00
Raffael Rostagno c6b0175a2c tests: wifi: esp32: Code improvement
Change log level to fixed value coherent with macros used in the
test (LOG_INF). Use context struct to better organize global
variables and improve code readability.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-08 16:57:27 +02:00
Aleksander Wasaznik 8cfad44852 Bluetooth: Deprecate adv auto-resume
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/72567

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-08 16:57:01 +02:00
Johann Fischer d7ab4f25e1 samples: disable CDC ACM logging
Disable CDC ACM logging in the configuration overlays used to select the
CDC ACM UART as the shell backend.
The build warning was introduced by the commit e8c4867806
("usb: cdc_acm: disable logging if used for shell with logging")
to prevent recursive logging when using the CDC ACM UART as shell or
logging backend

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-08 15:45:23 +02:00
Pavel Vasilyev 86b666548b modules: mbedtls: Enable back Mbed TLS PSA Crypto Storage C
This partially reverts 4b479016a7
to fix Bluetooth mesh tests with bsim.

Fixes #79533

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-08 13:44:22 +02:00
Chris Friedt 41e4b5323a drivers: flash: shell: add "flash copy" command
Add a flash copy command, capable of copying a region in one
flash device to a region on the same or another flash device. The
destination is erased prior to copying.

This is useful for evaluating mcuboot on devices with little
on-chip resources, or devices that are incapable of running more
elaborate image management services (e.g. via bluetooth or
networking).

Additionally, it's useful for evaluating mcuboot on devices with
one or more images stored on external spi flash.

The command syntax is
flash copy <src_dev> <dst_dev> <src_offs> <dest_offs> <size>

E.g.
flash copy flash@0 flash-controller@abcd1234 0x1234 0x5678 21012
Copied 21012 bytes from flash@0:1234 to \
  flash-controller@abcd1234:5678

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt ccc78912be tests: drivers: flash: add flash_copy() test
Add a test for coverage of flash_copy()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt 5d1c881b02 tests: flash: common: randomize before each test
test_flash_erase() requires that the expected[] array contains
pseudo-random data. However, the expected[] array would only
be initialized once before all tests are run using the setup
callback.

Instead, use the before() callback to randomize data before
each test in the suite, since there is otherwise no guarantee
that test_flash_erase() will be run directly after the
expected[] array has been randomized.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt ced4e16235 drivers: flash: provide a generic flash_copy() algorithm
Provide a generic flash_copy() algorithm that is capable of
copying from one flash device to another or within different
regions of the same flash device.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Krystof Sadlik 6bc0970c40 tests: counter: counter_basic_api: Added testcase wihtout alarms
Some counter drivers do not support alarms, so I added testcase which
starts the counter, checks if the value is in range after certain time and
stops the counter, to check if the counter is running correctly.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
Co-authored-by: Michal Smola <michal.smola@nxp.com>
2024-10-08 06:01:46 -04:00
TOKITA Hiroshi 16c9b74e3a drivers: flash: rpi_pico: Rename to avoid conflicting with SDK
Some symbol names have been conflicted with introducing pico-sdk 2.0.0.
Rename these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi 1400ee713a drivers: gpio: rpi_pico: Fitting for the changes made in pico-sdk 2.0.0
Following the GPIO interface changes in pico-sdk 2.0.0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi 6a2aafe286 modules: hal_rpi_pico: Update to fit for 2.0.0 directory structure
The directory structure has changed in 2.0.0,
so we update it accordingly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi dccf4bfb0f manifest: update hal_rpi_pico
Update RaspberryPi Pico hal to 2.0.0 release

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi 0f80f993f9 drivers: clock_control: renesas_ra: Adding macros to convert DT values
Adding the macros `RA_CGC_CLK_SRC` and `RA_CGC_CLK_DIV` that derive
the BSP clock settings from the DeviceTree node settings.
I also define some aliases to fill in the gaps with the BSP
naming conventions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi d72a69488c dts: renesas_ra: Change to describe the division ratio in a numeric
Move the process of replacing numerical values with macros to
the header, and set the division ratio in a numeric without
using macros in the device tree.

Change `clk-div` defined in `renesas,ra-cgc-pclk.yaml` to `div`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi 7c615f95d2 dts: renesas_ra: Referencing clocks change to DeviceTree's standard.
DeviceTree typically references the clock source using the `clocks`
property defined in `base.yaml`, so we'll change it to this.

Also delete the custom clock source definitions in
`renesas,ra-cgc-pclk-block.yaml`, `renesas,ra-cgc-pclk.yaml`, and
`renesas,ra-cgc-pll.yaml`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi 91d8e72dd4 dts: renesas_ra: Rename dts node path
Changes the path name of a DTS node so that it can be used
as the stem of a BSP macro.
All nodes to be changed are referenced via labels,
so only the name is changed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi 767d1ce5f6 devicetree: Adding UNQUOTED, TOKEN, and UPPERTOKEN variants of FULL_NAME
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi ab9cb58fed west.yml: Update revision of hal_renesas
Update HAL to improve the BSP clock setting process.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
Adrian Friedli 4584904807 doc: releases: migration-guide-4.0: add note about changed CoAP struct
Inform users about the new field in the `coap_transmission_parameters`
struct.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-10-08 06:00:56 -04:00
Adrian Friedli 98289e594d net: lib: coap: make ACK random factor runtime configurable
Extend the `coap_transmission_parameters` struct with the field
`ack_random_percent`. This was the last remaining CoAP transmission
parameter that was not configurable at runtime.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-10-08 06:00:56 -04:00
Firas Sammoura 6f072ba774 Ztest: Including the missing C standard library header
The ztest.c calls atoi, which is provided by the C standard library.
Remove the conditional inclusion of the C standard library with the
definition of CONFIG_ZTEST_SHUFFLE.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2024-10-08 06:00:45 -04:00
Rex Chen 5a195001e3 net: wifi: shell: add reg domain support
Supp api add reg domain support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-08 06:00:36 -04:00
Rex Chen 6551e4083f samples: net: wifi: enable time checking for mbedtls cert files
enable time checking for mbedtls certificate files, return failed
if certificate files expired.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-08 06:00:25 -04:00
Lukasz Stepnicki 022122d659 boards: nordic: ipc node added dcache alignement
dcache-alignement needs to be defined for ipc to have
consistent memory organization on both endpoints, when
shared memory is cacheable. nrf54h20 and nrf9280 are
using cacheable shared memory.
This is applied for ipc with icmsg backend.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-10-08 06:00:07 -04:00
Flavio Ceolin 9100a8b848 doc: security: Disclose CVE-2024-6444
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Flavio Ceolin 05c60db5a8 doc: security: Disclose CVE-2024-6443
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Flavio Ceolin 559f05d3f3 doc: security: Disclose CVE-2024-6442
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Ayush Singh c506cf5e83 boards: ti: beagleconnect_freedom: Remove PINCTRL
- PINCTRL is now being selected by
  soc/ti/simplelink/cc13x2x7_cc26x2x7/Kconfig, so no need to add to
  diffconfig.
- See https://github.com/zephyrproject-rtos/zephyr/pull/64718#discussion_r1734288793

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-08 05:59:41 -04:00
Ayush Singh 89995d0568 boards: ti: cc1352p7_launchpad: Remove PINCTRL
- PINCTRL is now being selected by
  soc/ti/simplelink/cc13x2x7_cc26x2x7/Kconfig, so no need to add to
  diffconfig.
- See https://github.com/zephyrproject-rtos/zephyr/pull/64718#discussion_r1734288793

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-08 05:59:41 -04:00