Skip to content

Commit

Permalink
allow setting custom qemu targets
Browse files Browse the repository at this point in the history
Allows building specific set of emulators instead of all of them.

Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Jul 18, 2021
1 parent e29012e commit e38dff0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
3 changes: 3 additions & 0 deletions scripts/configure_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -33,6 +35,7 @@ fi
if [ "$arch" != "mips64" ] ; then
QEMU_TARGETS="$QEMU_TARGETS mips64-linux-user"
fi
fi

set -x
./configure \
Expand Down

0 comments on commit e38dff0

Please sign in to comment.