Skip to content

Instantly share code, notes, and snippets.

@rgov
Created January 17, 2019 18:30
Show Gist options
  • Save rgov/9cd79344a152bf02379051d75525ba9f to your computer and use it in GitHub Desktop.
Save rgov/9cd79344a152bf02379051d75525ba9f to your computer and use it in GitHub Desktop.
# I spent a while adding a step to a CircleCI config that installed a more recent
# version of QEMU on an Ubuntu 14.04 VM. I ended up not needing it, but I didn't
# want to lose it in case it was useful for some reason.
#
# This builds and installs the qemu-aarch64-static tool and configures binfmt to
# support ELF files for ARM64.
- run:
name: Build QEMU
command: >-
wget -O qemu.tar.xz https://download.qemu.org/qemu-3.1.0.tar.xz &&
mkdir qemu &&
tar -C qemu --strip-components 1 -xvJf qemu.tar.xz &&
cd qemu &&
./configure --static --disable-system --enable-linux-user --target-list=aarch64-linux-user --prefix=/usr &&
make &&
sudo make install &&
sudo ln -s "$(which qemu-aarch64)" "$(which qemu-aarch64)"-static &&
sudo scripts/qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment