Skip to content

Commit

Permalink
chore: update Zephyr to v4.0.0 and use main mender-mcu
Browse files Browse the repository at this point in the history
* Update the Zephyr revision from `v3.7.0` to `4.0.0`
* Change the `mender-mcu` revision from `v0.3-inventory` to `main`
* Change `CONFIG_MBEDTLS_ZEPHYR_ENTROPY` to `CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR`
  and enable `CONFIG_MBEDTLS_ENTROPY_C`.
* Set `CONFIG_ZVFS_OPEN_MAX` from 4 to 5 to fix `ENFILE` (23) errors
  when creating sockets
* Increase `CONFIG_NET_SOCKETS_CONNECT_TIMEOUT` to stop zsock_connect()
  from timing out too early when downloading artifacts
* Disabled `ESP_SPIRAM` in esp32_ethernet_kit config due to linking errors
* Update zephyr sdk from 0.16.9 to 0.17.0

Ticket: MEN-7927

Signed-off-by: Daniel Skinstad Drabitzius <[email protected]>
  • Loading branch information
danielskinstad committed Jan 21, 2025
1 parent 80de969 commit 930af59
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stages:
- test

variables:
MENDER_MCU_REVISION: v0.3-inventory
MENDER_MCU_REVISION: main
IMAGE_VERSION: main
DOCKER_VERSION:
value: "27.3"
Expand Down
34 changes: 20 additions & 14 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive

# https://docs.zephyrproject.org/3.7.0/develop/getting_started/index.html#install-dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
pip \
ccache \
# https://docs.zephyrproject.org/4.0.0/develop/getting_started/index.html#install-dependencies
RUN apt-get update && apt install -y --no-install-recommends \
git \
cmake \
ninja-build \
gperf \
ccache \
dfu-util \
device-tree-compiler \
wget \
python3-dev \
python3-pip \
python3-setuptools \
python3-tk \
python3-wheel \
xz-utils \
file \
g++-multilib \
make \
gcc \
gcc-multilib \
git \
gperf \
make \
ninja-build \
wget \
xz-utils
g++-multilib \
libsdl2-dev \
libmagic1

# Using 0.16.x series to workaround issue with Espressif SDK missing suseconds_t definition
# It was been reported upstream and they will fix in the near future
ARG ZEPHYR_SDK_VERSION=0.16.9
ARG ZEPHYR_SDK_VERSION=0.17.0

RUN mkdir /opt/toolchains && wget -qO- https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz \
| tar -xJ -C /opt/toolchains \
Expand Down
3 changes: 3 additions & 0 deletions boards/esp32_ethernet_kit_procpu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
####################################
CONFIG_ETH_ESP32=y
CONFIG_NET_L2_ETHERNET=y

# Linking errors when enabled
ESP_SPIRAM=n
10 changes: 7 additions & 3 deletions prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ CONFIG_MBEDTLS_PK_WRITE_C=y
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=34816
CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y
CONFIG_MBEDTLS_ENTROPY_C=y

# We need to use our own extension to the config file to limit the size of the
# TLS output buffer. See the config and/or MEN-7807 for details.
Expand All @@ -63,7 +64,9 @@ CONFIG_MAIN_STACK_SIZE=2048
# Default is 1024
# https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

# Default is 4
# https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ZVFS_OPEN_MAX
CONFIG_ZVFS_OPEN_MAX=5

####################################
# Zephyr logging
Expand Down Expand Up @@ -97,7 +100,8 @@ CONFIG_DNS_RESOLVER_ADDITIONAL_BUF_CTR=5
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES=2
CONFIG_DNS_RESOLVER_MAX_SERVERS=2
CONFIG_DNS_NUM_CONCUR_QUERIES=5

# Avoid timeouts before recieving SYN-ACK from peer at default value (3000)
CONFIG_NET_SOCKETS_CONNECT_TIMEOUT=5000

####################################
# Developer zone
Expand Down
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ manifest:
projects:
- name: zephyr
remote: zephyrproject-rtos
revision: v3.7.0
revision: v4.0.0
import: true
- name: mender-mcu
remote: mender
revision: v0.3-inventory
revision: main
path: modules/mender-mcu
import: true

Expand Down

0 comments on commit 930af59

Please sign in to comment.