ci: install Hexagon LLVM cross-toolchain for Zephyr CI builds
Install the codelinaro Hexagon LLVM 22.1.8 cross-toolchain from artifacts.codelinaro.org for both x86_64 and aarch64 hosts.
On x86_64 the tarball extracts to x86_64-linux-gnu/; on aarch64 it extracts to aarch64-linux-gnu/.
A host/ symlink is created in both cases so that ENV PATH can use a single static path (/opt/toolchains/hexagon/host/bin) regardless of host arch.
The toolchain is used with ZEPHYR_TOOLCHAIN_VARIANT=host and TOOLCHAIN_VARIANT_COMPILER=llvm to build Zephyr for the qemu_hexagon/qemu_hexagon_virt board target.
Signed-off-by: Brian Cain brian.cain@oss.qualcomm.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Zephyr Docker Images
This repository contains the Dockerfiles for the following images:
ci-baseimage and the Zephyr SDK.The Docker images hosted by this repository provide the “full” environment for upstream Zephyr CI testing and development, containing the toolchains for all supported architectures and various other tools for testing.
If you are looking for a smaller image for downstream CI or local development targeting a specific architecture, consider using the Zephyr image provided by the Embedded Containers project.
Developer Docker Image
Overview
The Developer docker image includes all tools included in the CI image as well as the additional tools that can be useful for Zephyr development, such as the VNC server for testing display sample applications.
The Base docker images should be used to build custom docker images with 3rd party toolchains and tooling.
These images include the Zephyr SDK, which supports building most Zephyr targets.
Installation
Using Pre-built Developer Docker Image
The pre-built developer docker image is available on both GitHub Container Registry (
ghcr.io) and DockerHub (docker.io).For Zephyr 3.7 LTS, use the
v0.26-branchor the latestv0.26.xrelease Docker image.GitHub Container Registry (
ghcr.io)Current Zephyr versions
Zephyr 3.7 LTS
DockerHub (
docker.io)Current Zephyr versions
Zephyr 3.7 LTS
Building Developer Docker Image
The developer docker image can be built using the following commands:
It can be used for building Zephyr samples and tests by mounting the Zephyr workspace into it:
Using SSH Agent with Docker Image
The docker images can be built to use the SSH agent on the host to provide authorization to assets like restricted git repos. To do this there are a few requirements. One of which is that the user name of the processes inside the docker container must match the real user name on the host. The USERNAME build argument can be passed into the build process to override the default user name. Note that all three images need to be built locally with this USERNAME argument set correctly.
Then when running the ci or devel image there are additional command line arguments to connect the host ssh-agent ports to the ssh-agent ports inside the container.
Usage
Building a sample application
Follow the steps below to build and run a sample application:
Building display sample applications
It is possible to build and run the native POSIX sample applications that produce display outputs by connecting to the Docker instance using a VNC client.
In order to allow the VNC client to connect to the Docker instance, the port 5900 needs to be forwarded to the host:
Follow the steps below to build a display sample application for the native POSIX board:
The application display output can be observed by connecting a VNC client to localhost at the port 5900. The default VNC password is zephyr.
On a Ubuntu host, this can be done by running the following command: