Add LoongArch support for CI image
v2 cover Add LoongArch support for CI image
I somehow forgot to cc the list when sending v2, sorry for the noise.
This originates the series "New CI image and fixes" sent by Jiaxun Yang back to Jul. 2024, though only one PATCH remains since the Ubuntu image used as CI's base has been bumped to noble-20251013.
I also found the upstream added new dependencies to swtpm, breaking docker image build as we build the latest branch HEAD instead of a specified version, so in this series swtpm is locked to v0.10.1, the latest version without newly introduced dependencies.
V2 of the LoongArch support series[1] passed Azure CI[2] with some fixes and the buildman support patch[3]. Thanks for your time and review.
[1]: https://lore.kernel.org/u-boot/[email protected]/
[2]: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=13494
[3]: https://lists.u-boot-project.org/pipermail/u-boot/2026-July/627018.html
Changed from v1
- Drop patches for bumping CI image to Ubuntu focal
- Lock swtpm to an exact version
- Link to v1:
https://lore.kernel.org/u-boot/20240717-docker-image-v1-0-7c7fc6251e7a@flygoat.
com/
Jiaxun Yang (1):
CI: Dockerfile: Add LoongArch64 support
Yao Zi (1):
CI: Dockerfile: Lock the version of swtpm to v0.10.1
tools/docker/Dockerfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
Signature · 1 line
2.54.0
PATCH RESEND v2 1/2 CI: Dockerfile: Lock the version of swtpm to v0.10.1
Instead of pulling the latest code, specify the exact version to improve reproducibility.
--- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/docker/Dockerfile +1 -1
@@ -312,7 +312,7 @@ RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \ rm -rf /tmp/libtpms # Build swtpm -RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \ +RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm -b v0.10.1 && \ cd /tmp/swtpm && \ ./autogen.sh && \ ./configure && \
Signature · 1 line
2.54.0
PATCH RESEND v2 2/2 CI: Dockerfile: Add LoongArch64 support
In reply to Yao ZiFrom: Jiaxun Yang <[email protected]>
Install LoongArch64 toolchains, build LoongArch64 QEMU, build LoongArch64 GRUB.
--- tools/docker/Dockerfile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
tools/docker/Dockerfile +18 -3
@@ -17,7 +17,7 @@ ARG BUILDPLATFORM ENV DEBIAN_FRONTEND=noninteractive # Set architectures to build for (leaving out ARM which is an exception) -ENV ARCHS="aarch64 arc i386 m68k mips microblaze nios2 powerpc riscv64 riscv32 sh2 x86_64" +ENV ARCHS="aarch64 arc i386 loongarch64 m68k mips microblaze nios2 powerpc riscv64 riscv32 sh2 x86_64" # Mirror containing the toolchains ENV MIRROR=https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin
@@ -153,7 +153,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ xxd \ zip -# Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit +# Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit, and LoongArch +# 64-bit RUN git clone https://https.git.savannah.gnu.org/git/grub.git /tmp/grub && \ cd /tmp/grub && \ git checkout grub-2.14 && \
@@ -189,6 +190,20 @@ RUN git clone https://https.git.savannah.gnu.org/git/grub.git /tmp/grub && \ search search_fs_file search_fs_uuid search_label serial sleep test \ true && \ make clean && \ + ./configure --target=loongarch64 --with-platform=efi \ + CC=gcc \ + TARGET_CC=/opt/gcc-${TCVER}-nolibc/loongarch64-linux/bin/loongarch64-linux-gcc \ + TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/loongarch64-linux/bin/loongarch64-linux-objcopy \ + TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/loongarch64-linux/bin/loongarch64-linux-strip \ + TARGET_NM=/opt/gcc-${TCVER}-nolibc/loongarch64-linux/bin/loongarch64-linux-nm \ + TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/loongarch64-linux/bin/loongarch64-linux-ranlib && \ + make -j$(nproc) && \ + ./grub-mkimage -O loongarch64-efi -o /opt/grub/grubloongarch64.efi --prefix= -d \ + grub-core cat chain configfile echo efinet ext2 fat halt help linux \ + lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ + search search_fs_file search_fs_uuid search_label serial sleep test \ + true && \ + make clean && \ grub_cv_cc_mcmodel=no ./configure --target=riscv64 --with-platform=efi \ CC=gcc \ TARGET_CC=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-gcc \
@@ -232,7 +247,7 @@ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ # config user.name and user.email to make 'git am' happy git config user.name u-boot && \ git config user.email [email protected] && \ - ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \ + ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,loongarch64-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \ make -j$(nproc) all install && \ rm -rf /tmp/qemu
Signature · 1 line
2.54.0
Re: [RESEND PATCH v2 2/2] CI: Dockerfile: Add LoongArch64 support
Quoted 7 lines · Yao Zi
From: Jiaxun Yang <[email protected]>
Install LoongArch64 toolchains, build LoongArch64 QEMU, build LoongArch64 GRUB.
Signed-off-by Jiaxun Yang <[email protected]>Signed-off-by Yao Zi <[email protected]>
Signature · 1 line
Tom
Quoted 6 lines · Yao Zi
I somehow forgot to cc the list when sending v2, sorry for the noise.
This originates the series "New CI image and fixes" sent by Jiaxun Yang back to Jul. 2024, though only one PATCH remains since the Ubuntu image used as CI's base has been bumped to noble-20251013.
Quoted 6 lines
I also found the upstream added new dependencies to swtpm, breaking docker image build as we build the latest branch HEAD instead of a specified version, so in this series swtpm is locked to v0.10.1, the latest version without newly introduced dependencies.
[...]
Applied to u-boot/next, thanks!
[1/2] CI: Dockerfile: Lock the version of swtpm to v0.10.1
commit: 5ddc3158591e1bc1d9a9a18e2bc3bac06d4ec971
[2/2] CI: Dockerfile: Add LoongArch64 support
commit: 68c978fe5c57d4833849b3d29ebf6f671a7754e2Signature · 1 line
Tom