This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 5cc3bdef647 tools/ci: add the RH850 toolchain and QEMU to the CI 
environment.
5cc3bdef647 is described below

commit 5cc3bdef6476ad21a009b148def3da489aca35d3
Author: Parthiban Nallathambi <[email protected]>
AuthorDate: Thu Nov 5 20:24:19 2026 +0530

    tools/ci: add the RH850 toolchain and QEMU to the CI environment.
    
    The RH850 port needs the v850-elf GCC toolchain and qemu-system-rh850 to
    build and run its qemu-rh850-u2c configurations.  Install both from
    their prebuilt x86_64 Linux release archives in the Linux CI image, and
    in linux.sh and ubuntu.sh for local cibuild.sh runs.  On Ubuntu,
    qemu-system-rh850 also needs the GLib runtime.  Each archive is checked
    against its SHA-256 before it is unpacked.
    
    Sources and build scripts for both are published at
    https://github.com/linumiz/rh850-gcc-toolchain/releases/tag/v1.2.0
    
    The image stage drops the toolchain documentation under share/.  The
    stage adds about 98 MB compressed (297 MB unpacked) to the image.
    
    Signed-off-by: Parthiban Nallathambi <[email protected]>
---
 tools/ci/docker/linux/Dockerfile | 22 ++++++++++++++++++++++
 tools/ci/platforms/linux.sh      | 39 ++++++++++++++++++++++++++++++++++++++-
 tools/ci/platforms/ubuntu.sh     | 40 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 99 insertions(+), 2 deletions(-)

diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index 8a6e20f147c..eac15264b06 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -290,6 +290,22 @@ RUN mkdir -p riscv-none-elf-gcc && \
   curl -s -L 
"https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.3.0-1/xpack-riscv-none-elf-gcc-14.3.0-1-linux-x64.tar.gz";
 \
   | tar -C riscv-none-elf-gcc --strip-components 1 -xz
 
+###############################################################################
+# Build image for tool required by RH850 builds
+###############################################################################
+FROM nuttx-toolchain-base AS nuttx-toolchain-rh850
+# Download the RH850 GCC toolchain and qemu-system-rh850 prebuilt by Linumiz
+RUN mkdir -p v850-elf-gcc && \
+  curl -s -L --fail -o v850-elf-gcc.tar.gz 
"https://github.com/linumiz/rh850-gcc-toolchain/releases/download/v1.2.0/v850-elf-toolchain-linux-x86_64.tar.gz";
 && \
+  echo "a2194a060295008a2bd67db0e24c1cda8a795eba832b49b3f1d4cbb64cb242bd  
v850-elf-gcc.tar.gz" | sha256sum -c - && \
+  tar -C v850-elf-gcc -xzf v850-elf-gcc.tar.gz && \
+  rm -rf v850-elf-gcc.tar.gz v850-elf-gcc/share
+RUN mkdir -p qemu-rh850 && \
+  curl -s -L --fail -o qemu-rh850.tar.gz 
"https://github.com/linumiz/qemu-rh850/releases/download/rh850-v1.2.0/qemu-rh850-linux-x86_64.tar.gz";
 && \
+  echo "1e1d3d5d3a365ec24047e9128b11df09fdfddb2b385aa4c77dc45253aa448f6b  
qemu-rh850.tar.gz" | sha256sum -c - && \
+  tar -C qemu-rh850 -xzf qemu-rh850.tar.gz && \
+  rm qemu-rh850.tar.gz
+
 ###############################################################################
 # Build image for tool required by SPARC builds
 ###############################################################################
@@ -617,6 +633,11 @@ ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH"
 COPY --from=nuttx-toolchain-riscv /tools/riscv-none-elf-gcc/ 
riscv-none-elf-gcc/
 ENV PATH="/tools/riscv-none-elf-gcc/bin:$PATH"
 
+# RH850 toolchain and QEMU
+COPY --from=nuttx-toolchain-rh850 /tools/v850-elf-gcc/ v850-elf-gcc/
+COPY --from=nuttx-toolchain-rh850 /tools/qemu-rh850/ qemu-rh850/
+ENV PATH="/tools/v850-elf-gcc/bin:/tools/qemu-rh850/bin:$PATH"
+
 # SPARC toolchain
 COPY --from=nuttx-toolchain-sparc /tools/sparc-gaisler-elf-gcc/ 
sparc-gaisler-elf-gcc/
 ENV PATH="/tools/sparc-gaisler-elf-gcc/bin:$PATH"
@@ -678,6 +699,7 @@ RUN mkdir -p /ccache && \
   ln -sf `which ccache` /tools/ccache/bin/g++ && \
   ln -sf `which ccache` /tools/ccache/bin/p32-gcc && \
   ln -sf `which ccache` /tools/ccache/bin/rx-elf-gcc && \
+  ln -sf `which ccache` /tools/ccache/bin/v850-elf-gcc && \
   ln -sf `which ccache` /tools/ccache/bin/riscv-none-elf-gcc && \
   ln -sf `which ccache` /tools/ccache/bin/riscv-none-elf-g++ && \
   ln -sf `which ccache` /tools/ccache/bin/sparc-gaisler-elf-gcc && \
diff --git a/tools/ci/platforms/linux.sh b/tools/ci/platforms/linux.sh
index 6f5ed69e5a1..19461b88beb 100755
--- a/tools/ci/platforms/linux.sh
+++ b/tools/ci/platforms/linux.sh
@@ -169,6 +169,42 @@ riscv_gcc_toolchain() {
   command riscv-none-elf-gcc --version
 }
 
+rh850_gcc_toolchain() {
+  add_path "${NUTTXTOOLS}"/v850-elf-gcc/bin
+
+  if [ ! -f "${NUTTXTOOLS}/v850-elf-gcc/bin/v850-elf-gcc" ]; then
+    local basefile
+    basefile=v850-elf-toolchain-linux-x86_64
+    cd "${NUTTXTOOLS}"
+    # Download the RH850 GCC toolchain prebuilt by Linumiz
+    curl -O -L -s 
https://github.com/linumiz/rh850-gcc-toolchain/releases/download/v1.2.0/${basefile}.tar.gz
+    echo "a2194a060295008a2bd67db0e24c1cda8a795eba832b49b3f1d4cbb64cb242bd  
${basefile}.tar.gz" | sha256sum -c -
+    mkdir -p v850-elf-gcc
+    tar -C v850-elf-gcc -xzf ${basefile}.tar.gz
+    rm ${basefile}.tar.gz
+  fi
+
+  command v850-elf-gcc --version
+}
+
+rh850_qemu() {
+  add_path "${NUTTXTOOLS}"/qemu-rh850/bin
+
+  if [ ! -f "${NUTTXTOOLS}/qemu-rh850/bin/qemu-system-rh850" ]; then
+    local basefile
+    basefile=qemu-rh850-linux-x86_64
+    cd "${NUTTXTOOLS}"
+    # Download qemu-system-rh850 prebuilt by Linumiz
+    curl -O -L -s 
https://github.com/linumiz/qemu-rh850/releases/download/rh850-v1.2.0/${basefile}.tar.gz
+    echo "1e1d3d5d3a365ec24047e9128b11df09fdfddb2b385aa4c77dc45253aa448f6b  
${basefile}.tar.gz" | sha256sum -c -
+    mkdir -p qemu-rh850
+    tar -C qemu-rh850 -xzf ${basefile}.tar.gz
+    rm ${basefile}.tar.gz
+  fi
+
+  command qemu-system-rh850 --version
+}
+
 rx_gcc_toolchain() {
   add_path "${NUTTXTOOLS}"/renesas-toolchain/rx-elf-gcc/bin
 
@@ -332,6 +368,7 @@ setup_links() {
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/g++
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/p32-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/rx-elf-gcc
+  ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/v850-elf-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/riscv-none-elf-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/riscv-none-elf-g++
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/sparc-gaisler-elf-gcc
@@ -350,7 +387,7 @@ install_build_tools() {
   mkdir -p "${NUTTXTOOLS}"
   echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh
 
-  install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain bloaty 
kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain 
rx_gcc_toolchain sparc_gcc_toolchain xtensa_esp_gcc_toolchain util_linux 
wasi_sdk raspberrypi_pico_sdk"
+  install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain bloaty 
kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain 
rh850_gcc_toolchain rh850_qemu rx_gcc_toolchain sparc_gcc_toolchain 
xtensa_esp_gcc_toolchain util_linux wasi_sdk raspberrypi_pico_sdk"
 
   oldpath=$(cd . && pwd -P)
   for func in ${install}; do
diff --git a/tools/ci/platforms/ubuntu.sh b/tools/ci/platforms/ubuntu.sh
index 16d90b9e032..16306a0db49 100755
--- a/tools/ci/platforms/ubuntu.sh
+++ b/tools/ci/platforms/ubuntu.sh
@@ -244,6 +244,43 @@ dlang() {
   command ldc2 --version | head -n 5
 }
 
+rh850_gcc_toolchain() {
+  add_path "${NUTTXTOOLS}"/v850-elf-gcc/bin
+
+  if [ ! -f "${NUTTXTOOLS}/v850-elf-gcc/bin/v850-elf-gcc" ]; then
+    local basefile
+    basefile=v850-elf-toolchain-linux-x86_64
+    cd "${NUTTXTOOLS}"
+    # Download the RH850 GCC toolchain prebuilt by Linumiz
+    curl -O -L -s 
https://github.com/linumiz/rh850-gcc-toolchain/releases/download/v1.2.0/${basefile}.tar.gz
+    echo "a2194a060295008a2bd67db0e24c1cda8a795eba832b49b3f1d4cbb64cb242bd  
${basefile}.tar.gz" | sha256sum -c -
+    mkdir -p v850-elf-gcc
+    tar -C v850-elf-gcc -xzf ${basefile}.tar.gz
+    rm ${basefile}.tar.gz
+  fi
+
+  command v850-elf-gcc --version
+}
+
+rh850_qemu() {
+  add_path "${NUTTXTOOLS}"/qemu-rh850/bin
+
+  if [ ! -f "${NUTTXTOOLS}/qemu-rh850/bin/qemu-system-rh850" ]; then
+    local basefile
+    basefile=qemu-rh850-linux-x86_64
+    sudo apt-get install -y libglib2.0-0
+    cd "${NUTTXTOOLS}"
+    # Download qemu-system-rh850 prebuilt by Linumiz
+    curl -O -L -s 
https://github.com/linumiz/qemu-rh850/releases/download/rh850-v1.2.0/${basefile}.tar.gz
+    echo "1e1d3d5d3a365ec24047e9128b11df09fdfddb2b385aa4c77dc45253aa448f6b  
${basefile}.tar.gz" | sha256sum -c -
+    mkdir -p qemu-rh850
+    tar -C qemu-rh850 -xzf ${basefile}.tar.gz
+    rm ${basefile}.tar.gz
+  fi
+
+  command qemu-system-rh850 --version
+}
+
 rx_gcc_toolchain() {
   add_path "${NUTTXTOOLS}"/renesas-toolchain/rx-elf-gcc/bin
 
@@ -413,6 +450,7 @@ setup_links() {
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/g++
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/p32-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/rx-elf-gcc
+  ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/v850-elf-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/riscv-none-elf-gcc
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/riscv-none-elf-g++
   ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/sparc-gaisler-elf-gcc
@@ -431,7 +469,7 @@ install_build_tools() {
   mkdir -p "${NUTTXTOOLS}"
   echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh
 
-  install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain 
avr_gcc_toolchain binutils bloaty clang_tidy gen_romfs gperf kconfig_frontends 
mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang rx_gcc_toolchain 
sparc_gcc_toolchain xtensa_esp_gcc_toolchain u_boot_tools util_linux wasi_sdk 
c_cache raspberrypi_pico_sdk"
+  install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain 
avr_gcc_toolchain binutils bloaty clang_tidy gen_romfs gperf kconfig_frontends 
mips_gcc_toolchain python_tools riscv_gcc_toolchain rh850_gcc_toolchain 
rh850_qemu rust dlang rx_gcc_toolchain sparc_gcc_toolchain 
xtensa_esp_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache 
raspberrypi_pico_sdk"
 
   oldpath=$(cd . && pwd -P)
   for func in ${install}; do

Reply via email to