From 7d1c4343455372572c4eea8e38cfa218d2a03137 Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Mon, 6 Mar 2023 21:06:18 +0800 Subject: [PATCH] update qemu-binfmt-conf.sh to support loongarch64 Signed-off-by: zhangguanzhang --- containers/latest/Dockerfile | 2 +- containers/latest/register.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/latest/Dockerfile b/containers/latest/Dockerfile index 1edc8e8..aeb6adf 100644 --- a/containers/latest/Dockerfile +++ b/containers/latest/Dockerfile @@ -1,7 +1,7 @@ FROM busybox ENV QEMU_BIN_DIR=/usr/bin ADD ./register.sh /register -ADD https://raw.githubusercontent.com/qemu/qemu/e75941331e4cdc05878119e08635ace437aae721/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh +ADD https://raw.githubusercontent.com/qemu/qemu/f8d1ae82623fef4e7fb796efbaaa2ddc63594d09/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh RUN chmod +x /qemu-binfmt-conf.sh COPY qemu-*-static /usr/bin/ ENTRYPOINT ["/register"] diff --git a/containers/latest/register.sh b/containers/latest/register.sh index 7caaa51..428b3f3 100755 --- a/containers/latest/register.sh +++ b/containers/latest/register.sh @@ -1,7 +1,7 @@ #!/bin/sh QEMU_BIN_DIR=${QEMU_BIN_DIR:-/usr/bin} - +QEMU_SUFFIX=${QEMU_SUFFIX:--static} if [ ! -d /proc/sys/fs/binfmt_misc ]; then echo "No binfmt support in the kernel." @@ -20,4 +20,4 @@ if [ "${1}" = "--reset" ]; then find /proc/sys/fs/binfmt_misc -type f -name 'qemu-*' -exec sh -c 'echo -1 > {}' \; fi -exec /qemu-binfmt-conf.sh --qemu-suffix "-static" --qemu-path "${QEMU_BIN_DIR}" $@ +exec /qemu-binfmt-conf.sh --qemu-suffix "${QEMU_SUFFIX}" --qemu-path "${QEMU_BIN_DIR}" $@