Skip to content

Zephyr: Update to Zephyr 4.4#19807

Open
zingo wants to merge 12 commits into
pytorch:mainfrom
zingo:Zephyr-Update-to-Zephyr-4.4
Open

Zephyr: Update to Zephyr 4.4#19807
zingo wants to merge 12 commits into
pytorch:mainfrom
zingo:Zephyr-Update-to-Zephyr-4.4

Conversation

@zingo

@zingo zingo commented May 27, 2026

Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings May 27, 2026 14:37
@zingo zingo added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label May 27, 2026
@zingo zingo requested a review from digantdesai as a code owner May 27, 2026 14:37
@zingo zingo added ciflow/trunk release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. labels May 27, 2026
@pytorch-bot

pytorch-bot Bot commented May 27, 2026

Copy link
Copy Markdown

🔗 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 Pending

As of commit 35d8fb3 with merge base e88fd04 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 27, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 27, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@github-actions github-actions Bot added the module: arm Issues related to arm backend label May 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .ci/scripts/test_zephyr.sh Outdated
Comment thread .ci/scripts/test_zephyr.sh
Comment thread .github/workflows/trunk.yml Outdated
Copilot AI review requested due to automatic review settings May 27, 2026 14:45
@zingo

zingo commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

@psiddh & @rascani this probably need a Meta review.

@zingo zingo added the help wanted Extra attention is needed label May 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Comment thread docs/source/zephyr_alif_tutorial.md Outdated
Comment thread docs/source/zephyr_alif_tutorial.md
Comment thread docs/source/zephyr_alif_tutorial.md
Comment thread .github/workflows/trunk.yml Outdated
Copilot AI review requested due to automatic review settings May 27, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.

Comment thread .ci/docker/common/zephyr_sdk_release_proxy.py
Comment thread .ci/scripts/test_zephyr.sh Outdated
Copilot AI review requested due to automatic review settings May 27, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/trunk.yml Outdated
@digantdesai digantdesai requested a review from rascani May 27, 2026 22:52
@rascani

rascani commented May 29, 2026

Copy link
Copy Markdown
Contributor

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.

Comment thread .ci/docker/common/install_zephyr.sh
@zingo zingo force-pushed the Zephyr-Update-to-Zephyr-4.4 branch from 11b9daa to 29b2a0c Compare June 5, 2026 15:20
zingo added 2 commits June 13, 2026 09:58
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
Copilot AI review requested due to automatic review settings June 13, 2026 10:04
@zingo zingo force-pushed the Zephyr-Update-to-Zephyr-4.4 branch from 449bf00 to 0a9bf90 Compare June 13, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Comment thread examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake
Comment thread examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake
--output=mv2_ethosu.pte
```

If rtss_he is used instead of rtss_hp below use `--target=ethos-u55-128` to match the hardware.
Comment thread .ci/scripts/test_zephyr.sh
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
Copilot AI review requested due to automatic review settings June 15, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 8 comments.

Comment on lines 57 to 62
# 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()
Comment on lines +51 to 53
# Upgrade cmake to 3.24 or newer.
apt install -y software-properties-common lsb-release
apt update
Comment thread docs/source/zephyr_alif_tutorial.md Outdated
Comment thread docs/source/zephyr_alif_tutorial.md Outdated
```
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:-}
@zingo

zingo commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

testsfails unrelated

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 2 comments.

Comment on lines 58 to 62
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()
Comment on lines +227 to +229
if ! git config --get user.name >/dev/null 2>&1; then
git config --global user.name "Github Executorch"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants