From e38dff02a1ba1aa8c589430664d5a6855550a305 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 16 Jul 2021 22:58:26 -0700 Subject: [PATCH] allow setting custom qemu targets Allows building specific set of emulators instead of all of them. Signed-off-by: Tonis Tiigi --- Dockerfile | 2 +- scripts/configure_qemu.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eca6e849..2394b941 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN set -e; \ FROM base AS build ARG TARGETPLATFORM -ARG QEMU_VERSION +ARG QEMU_VERSION QEMU_TARGETS ENV AR=llvm-ar STRIP=llvm-strip RUN --mount=target=.,from=src,src=/src/qemu,rw --mount=target=./install-scripts,src=scripts \ TARGETPLATFORM=${TARGETPLATFORM} configure_qemu.sh && \ diff --git a/scripts/configure_qemu.sh b/scripts/configure_qemu.sh index 80843de7..39a8e609 100755 --- a/scripts/configure_qemu.sh +++ b/scripts/configure_qemu.sh @@ -4,8 +4,10 @@ set -e : ${QEMU_TARGETS=} + arch="$(xx-info arch)" +if [ -z "$QEMU_TARGETS" ]; then if [ "$arch" != "amd64" ]; then QEMU_TARGETS="$QEMU_TARGETS x86_64-linux-user" fi @@ -33,6 +35,7 @@ fi if [ "$arch" != "mips64" ] ; then QEMU_TARGETS="$QEMU_TARGETS mips64-linux-user" fi +fi set -x ./configure \