From ff9c68ace0f742f76fb58eebf1882777ee4a880f Mon Sep 17 00:00:00 2001 From: Haozhe Zhu Date: Tue, 16 Sep 2025 11:06:20 +0800 Subject: [PATCH] fix: register binfmts for arm/aarch64 in dockerfile --- sdbuild/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdbuild/Dockerfile b/sdbuild/Dockerfile index 055ac7c72..eb55ff6a7 100644 --- a/sdbuild/Dockerfile +++ b/sdbuild/Dockerfile @@ -88,9 +88,13 @@ RUN useradd -m ${USERNAME} \ ENV PATH="/opt/qemu/bin:/opt/crosstool-ng/bin:${PATH}" ENV LD_PRELOAD=/lib/x86_64-linux-gnu/libudev.so.1 +# Register binfmt to allow run ARM elf on x86 +RUN update-binfmts --enable qemu-arm +RUN update-binfmts --enable qemu-aarch64 + # Switch to non-root user USER ${USERNAME} WORKDIR /workspace ENV USERNAME=${USERNAME} -CMD /bin/bash \ No newline at end of file +CMD /bin/bash