Zephyr: Update to Zephyr 4.4#19807
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19807
Note: Links to docs will display an error until the docs builds have been completed. ❌ 8 New Failures, 8 PendingAs of commit 35d8fb3 with merge base e88fd04 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Pull request overview
Updates the ExecuTorch Zephyr integration to target Zephyr v4.4.0, refreshes the Zephyr setup flow used by CI/docs, and adds out-of-the-box support for the ensemble_e8_dk Alif E8 board variants.
Changes:
- Bump Zephyr manifest revision to v4.4.0 and switch setup docs/CI to
west packages pip --install+west sdk install. - Update Zephyr sample docs (FVP + Alif E8) and tutorials for Python 3.12+, new board naming, and improved flashing/run instructions.
- Improve Zephyr CI setup: shared workspace directory (
zephyr_dev_root) and a local Zephyr SDK releases proxy fallback to mitigate rate limits/network flakiness.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
zephyr/samples/mv2-ethosu/README.md |
Updates prerequisites (Python 3.12+), FVP env vars, and Alif E8 build/flash/run instructions. |
zephyr/samples/mv2-ethosu/boards/ensemble_e8_dk_ae822fa0e5597ls0_rtss_hp.overlay |
New DTS overlay to expose a larger contiguous SRAM region and enable Ethos-U for RTSS-HP. |
zephyr/samples/mv2-ethosu/boards/ensemble_e8_dk_ae822fa0e5597ls0_rtss_hp.conf |
New board config enabling Ethos-U and DMA-accessible PTE handling (HP). |
zephyr/samples/mv2-ethosu/boards/ensemble_e8_dk_ae822fa0e5597ls0_rtss_he.overlay |
New DTS overlay for RTSS-HE (larger SRAM + Ethos-U node). |
zephyr/samples/mv2-ethosu/boards/ensemble_e8_dk_ae822fa0e5597ls0_rtss_he.conf |
New board config enabling Ethos-U and DMA-accessible PTE handling (HE). |
zephyr/samples/mv2-ethosu/boards/alif_e8_dk_ae822fa0e5597xx0_rtss_hp.conf |
Removes old Alif E8 board config in favor of upstream ensemble_e8_dk. |
zephyr/samples/hello-executorch/README.md |
Adds safer LD_LIBRARY_PATH export for FVP usage. |
zephyr/README.md |
Updates to Zephyr 4.4 and adds explicit west packages + west sdk install steps (used by CI). |
docs/source/zephyr_alif_tutorial.md |
Updates Alif tutorial for Zephyr 4.4, Python 3.12+, new model naming, and expanded flashing guidance. |
backends/arm/test/test_github_trunk_zephyr.sh |
Adds --zephyr-dev-root and reuses a single setup across README runs. |
backends/arm/scripts/toolchain_utils.sh |
Updates Zephyr toolchain download URLs/checksums to SDK v1.0.1 assets. |
.gitignore |
Ignores the new zephyr_dev_root/ workspace and its backups. |
.github/workflows/trunk.yml |
Ensures Zephyr CI runs under Python 3.12 by creating/activating a dedicated conda env. |
.claude/skills/zephyr/SKILL.md |
Updates internal Zephyr skill doc to Zephyr 4.4 / west sdk install / west packages. |
.ci/scripts/zephyr_sdk_release_proxy.py |
Adds a local synthetic GitHub Releases API/proxy for Zephyr SDK assets with caching + checksum verification. |
.ci/scripts/test_zephyr.sh |
Refactors Zephyr setup to a configurable workspace, adds setup-only/skip-setup, and SDK proxy fallback. |
.ci/docker/common/install_zephyr.sh |
Removes pre-downloading Zephyr SDK from the image build step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
It looks like there are a few zephyr jobs failing, can you take a look @zingo? Also, I'd like to get a better understanding for the rationale behind the SDK caching/proxying. In general, I'd like to minimize downloads in CI (causes flakes), but to me the ideal is caching most downloads in the docker image. |
11b9daa to
29b2a0c
Compare
The Zephyr CI image sets LD_LIBRARY_PATH globally to include host system library directories. When Zephyr SDK host tools such as dtc are launched, this can make the SDK dynamic loader resolve libraries from the host instead of the SDK hosttools sysroot. Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: I036dd0ae732bbfe20c8e6c41831692a3bb7c6f60
Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: I81f964b0137756a66499d38c5540a91494380c47
449bf00 to
0a9bf90
Compare
| --output=mv2_ethosu.pte | ||
| ``` | ||
|
|
||
| If rtss_he is used instead of rtss_hp below use `--target=ethos-u55-128` to match the hardware. |
The Zephyr preset size test builds test/size_test.cpp directly with arm-zephyr-eabi, outside Zephyr's normal application link flow. With Zephyr SDK 1.0.1 this link no longer gets nosys-style syscall stubs or a permissive linker script. FileDataLoader and libc therefore pull in symbols such as open, read, close, fstat, gettimeofday, _exit, and Picolibc heap symbols, causing the size-test link to fail. Add size-test-only no-OS syscall stubs behind EXECUTORCH_SIZE_TEST_NO_OS_LINK and use a small generic linker script for this direct Zephyr SDK link. The option is enabled only for the zephyr-preset size-test CI path, so normal Zephyr app builds are unchanged. Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: Id67a8bf595f2e8060f0e84a20dffb97ceac158e0
| # Link options | ||
| add_link_options(-mcpu=${GCC_CPU} -mthumb) | ||
|
|
||
| if(SEMIHOSTING) | ||
| add_link_options(--specs=rdimon.specs) | ||
| else() | ||
| add_link_options(--specs=nosys.specs) | ||
| if(EXECUTORCH_SIZE_TEST_NO_OS_LINK) | ||
| set(SIZE_TEST_LINKER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/generic-no-memory.ld") | ||
| add_link_options(-T${SIZE_TEST_LINKER_SCRIPT}) | ||
| endif() |
| # Upgrade cmake to 3.24 or newer. | ||
| apt install -y software-properties-common lsb-release | ||
| apt update |
| ``` | ||
| export FVP_ROOT=$PWD/modules/lib/executorch/examples/arm/arm-scratch/FVP-corstone300 | ||
| export ARMFVP_BIN_PATH=${FVP_ROOT}/models/Linux64_GCC-9.3 | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH:-} |
| export FVP_ROOT=$PWD/modules/lib/executorch/examples/arm/arm-scratch/FVP-corstone320 | ||
| export ARMFVP_BIN_PATH=${FVP_ROOT}/models/Linux64_GCC-9.3 | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH} | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH:-} |
| ``` | ||
| export FVP_ROOT=$PWD/modules/lib/executorch/examples/arm/arm-scratch/FVP-corstone300 | ||
| export ARMFVP_BIN_PATH=${FVP_ROOT}/models/Linux64_GCC-9.3 | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH:-} |
| export FVP_ROOT=$PWD/modules/lib/executorch/examples/arm/arm-scratch/FVP-corstone320 | ||
| export ARMFVP_BIN_PATH=${FVP_ROOT}/models/Linux64_GCC-9.3 | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH} | ||
| export LD_LIBRARY_PATH=${FVP_ROOT}/python/lib:${ARMFVP_BIN_PATH}:${LD_LIBRARY_PATH:-} |
|
testsfails unrelated |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| add_link_options(-mcpu=${GCC_CPU} -mthumb) | ||
|
|
||
| if(SEMIHOSTING) | ||
| add_link_options(--specs=rdimon.specs) | ||
| else() | ||
| add_link_options(--specs=nosys.specs) | ||
| if(EXECUTORCH_SIZE_TEST_NO_OS_LINK) | ||
| set(SIZE_TEST_LINKER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/generic-no-memory.ld") | ||
| add_link_options(-T${SIZE_TEST_LINKER_SCRIPT}) | ||
| endif() |
| if ! git config --get user.name >/dev/null 2>&1; then | ||
| git config --global user.name "Github Executorch" | ||
| fi |
Update the Zephyr module setup and CI flow for Zephyr 4.4. Run Zephyr tests in
a Python 3.12 venv, update README-tested setup commands, and keep the Zephyr SDK
version and release asset handling in one shared helper.
Pre-cache Zephyr SDK release assets in the CI Docker image and use the cached
assets through the Zephyr SDK release proxy during test setup. Also clear the CI
Docker image's global LD_LIBRARY_PATH before running Zephyr tests so SDK host
tools use their intended runtime libraries.
Update the Arm/Zephyr sample documentation and board configuration for the
current Alif Ensemble E8 RTSS-HE/RTSS-HP target names, memory settings, and
expected output.
Test plan
Mosted tested by Github CI , Alif readme tested by hand.
cc @digantdesai @freddan80 @per @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani