Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Zephyr to 3.7.0 and NCS to 2.7.0 #530

Merged
merged 16 commits into from
Sep 4, 2024
Merged

Bump Zephyr to 3.7.0 and NCS to 2.7.0 #530

merged 16 commits into from
Sep 4, 2024

Conversation

mniestroj
Copy link
Collaborator

@mniestroj mniestroj commented Jun 25, 2024

TODO:

  • drop upstreamable patches
  • test nRF91 with twister
  • investigate and solve nRF52840 + ESP-AT issues (only first connect attempt looks succesful)
  • use tagged releases for Zephyr and NCS in west manifests

Copy link

github-actions bot commented Jun 25, 2024

Visit the preview URL for this PR (updated for commit 05062f3):

https://golioth-firmware-sdk-doxygen-dev--pr530-bump-zephyr-nc-2f52iu26.web.app

(expires Wed, 11 Sep 2024 15:01:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

Copy link

github-actions bot commented Jun 25, 2024

Code Coverage

Type Coverage
lines 58.1% (1301 of 2240 lines)
functions 66.5% (129 of 194 functions)

@mniestroj mniestroj force-pushed the bump-zephyr-ncs branch 4 times, most recently from 2b6325b to 4d40e1b Compare June 29, 2024 06:16
@mniestroj mniestroj mentioned this pull request Jul 3, 2024
@mniestroj mniestroj force-pushed the bump-zephyr-ncs branch 4 times, most recently from 0db0bad to 6026aa5 Compare July 11, 2024 11:37
@mniestroj mniestroj force-pushed the bump-zephyr-ncs branch 17 times, most recently from eebabbc to 8b44ba3 Compare August 1, 2024 09:20
Board names now have forward slashes which are not allowed in Golioth
blueprint names. This commit uses the west_board name, but replaces forward
slashes with underscores to match the blueprint name.

Signed-off-by: Mike Szczys <mike@golioth.io>
mniestroj and others added 15 commits September 4, 2024 16:58
All 39 patches were upstreamed, so drop them.

Maintain default values for old (NCS, POSIX_MAX_FDS and EVENTFD_*) as well
as new (Zephyr upstream, ZVFS_OPEN_MAX and ZVFS_EVENTFD_*) Kconfig options.

Update platform names to be HWMv2 compliant:
 * esp32_devkitc_wrover -> esp32_devkitc_wrover/esp32/procpu
 * native_sim_64 -> native_sim/native/64
 * nrf52840dk_nrf52840 -> nrf52840dk/nrf52840
 * nrf9160dk_nrf9160_ns -> nrf9160dk/nrf9160/ns
 * rak5010_nrf52840 -> rak5010/nrf52840

Update overlay configurations for platforms using ESP-AT WiFi driver. New
DNS resolver uses recvfrom() API with non-NULL remote address. This API
requires remote address to be set, which is only possible if ESP-AT driver
already assigned remote address for incoming packet. Such behavior is
implemented only with CONFIG_WIFI_ESP_AT_CIPDINFO_USE=y, which requires
CONFIG_WIFI_ESP_AT_PASSIVE_MODE=y to be functional. Set also
CONFIG_WIFI_ESP_AT_DNS_USE=y, so that DNS resolver gets reinitialized
automatically after connection to WiFi Access Point was established.

Replace CONFIG_LTE_CONNECTIVITY with CONFIG_NRF_MODEM_LIB_NET_IF. Enable
"auto start" and "auto connect" in all samples which are now disabled by
default.

Make use of 'configdefault' Kconfig keyword, which allows to safely
configure default values without replicating all dependencies. This
requires to provide type of the configuration option (e.g. 'int') when
option is not provided by included Zephyr Kconfig subsystem (either hidden
under 'if' or not provided due to differences between upstream and NCS'
variants of Zephyr).

Use matrix.hil_board in artifacts names, as '/' is treated as special
character and fobidden.

Flash only Zephyr "application" image for Espressif targets, since that is
the default behavior of 'west flash' with 'esp32' runner after introduction
of CONFIG_ESP_SIMPLE_BOOT [1] in Zephyr upstream. Put the 0x1000
application offset in pytest-hil class instantiation.

Enable SHA256 and SHA384 hashes explicitly. So far those were enabled by
default in old Zephyr versions, but that is no longer the case.

Override default value for new CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH
option, so that DTLS outgoing packet lenght is not limited further to 1024,
but instead matches MBEDTLS_SSL_IN_CONTENT_LEN and
MBEDTLS_SSL_OUT_CONTENT_LEN settings.

For all nrf9160dk/nrf9160/ns board files, remove the
CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC symbol which conflicts
with the CONFIG_NRF_MODEM_LIB_NET_IF symbol that is also being set in those
file. The accounts for a change in sdk-nrf that automatically selects
CONFIG_NRF_MODEM_LIB_ON_FAULT_LTE_NET_IF instead.

[1] Zephyr upstream 2395f08d489c ("soc: espressif: esp32: simple boot
  support")

Co-authored-by: Mike Szczys <mike@golioth.io>
Signed-off-by: Mike Szczys <mike@golioth.io>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Old zcbor was used with NCS. Since that is no longer the case, drop
compatibility layer for zcbor <0.8.0.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This header is available both with Zephyr and NCS fork of Zephyr. Hence
drop fallback to rand32.h which was provided by old Zephyr versions.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
So far TLS handshake was triggered by sending CoAP Empty message. In new
Zephyr versions connect() behavior on DTLS sockets has changed so that TLS
handshake is attempted implicitly. Rely on that functionality and drop
explicit empty packet sending.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Bump CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE from the default of 128
up to 160 to resolve buffer overrun issues.

Beginning with Zephyr v3.7.0 we see CMUX buffer overrun warnings:

  <wrn> modem_cmux: DLCI 1 receive buffer overrun (dropped 27 out \
    of 112 bytes)

This was probably an issue previously, but the warning wasn't added until
the v3.7.0 release. Running several Golioth samples showed around 25
dropped byes on average and never more than 32. Increasing the max frame
size resolves the warnings.

Signed-off-by: Mike Szczys <mike@golioth.io>
Introduce helper option used for selecting better defaults when running
Twister tests. This will replace specifying options manually in
'sample.yaml' file under 'extra_configs'.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Change default Kconfig options based on GOLIOTH_SAMPLE_TWISTER_TEST, which
is set to 'y' when running from Twister. This allows easier "as in Twister"
builds with 'west build' directly. Additionally using default options
provided via Kconfig suppresses warnings about unsatisfied dependencies
with architecture/SoC/board specific options.

Leave CONFIG_NATIVE_UART_0_ON_STDINOUT=y in sample.yaml for now, since it
is not possible to set it via defconfig due to unnamed Kconfig choice
option. This has been improved in upstream Zephyr, but those changed did
not make it before Zephyr v3.7.0 release.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Signed-off-by: Mike Szczys <mike@golioth.io>
Zephyr v3.7.0 moves to NXP Ethernet driver which was exhibiting Link
Down/Up behavior during OTA Firmware Update that resulted in the inability
to download new firmware. This behavior is similar to issues reported
upstream:

- zephyrproject-rtos/zephyr#76446
- zephyrproject-rtos/zephyr#76965

Cherry-picking the suggested patch did not resolve the issue. This commit
reverts to the old driver using an overlay file for the mimxrt1024_evk.
When there is an upstream fix available, these overlay files may be removed
(note the certificate_provisioning example still needs the stab node in its
board overlay file).

Signed-off-by: Mike Szczys <mike@golioth.io>
Introduce new fixture, which returns a list of connection (transport)
specific arguments to mcumgr binary. Right now those arguments are fixed
for serial port, but in the subsequent commits they will return UDP for
'native_sim' tests.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Improve reliability of the mcumgr transport by allowing 3 retries with 2s
delays between requests.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Support 'native_sim' platform by configuring settings storage partition.

Instead of using mcumgr over serial (as with hardware platforms), use
mcumgr over UDP. This simplifies mcumgr configuration, as there is no
serial tty when running native_sim platform, but rather stdin and stdout
streams. While it is possible to wrap it to a pseudo-terminal, it is just
much easier (by changing configuration) to switch to UDP transport instead.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Signed-off-by: Sam Friedman <sam@golioth.io>
Updates CHANGELOG.md with known issue when using the esp_at WiFi driver
with certificate auth in Zephyr 3.7.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
@mniestroj mniestroj merged commit 05062f3 into main Sep 4, 2024
38 of 44 checks passed
@mniestroj mniestroj deleted the bump-zephyr-ncs branch September 4, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants