Lately I found myself working on an ARM64 (aka aarch64) based system which in turn I don’t own. So I needed to get a system to build and test things on.
How?
First of all, you need to have qemu static builds installed. For example, for ArchLinux you need to get them from AUR:
$ yaourt -S qemu qemu-user-static binfmt-support
And then enable the aarch64
# update-binfmts --enable qemu-aarch64
$ docker run -ti --rm -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static apol/test bash
X11
Once set up, it can be used as any regular docker image. For example passing -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
will give us access to X11, allowing to run apps:
$ docker run -ti --rm -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix apol/test bash
One possibly wants to use Xephyr to test some stuff, probably on the safer side.
Similarly, you’ll get to use gdb or any tooling you need and is available for the architecture.
KDevelop
You get to code against your project against the platform you need by passing the extra required arguments, then most features discussed here apply.
Beyond…
Granted it will work rather slow, as it’s emulation, but given the alternative is not being able to work at all, I’m happy.
Note that most of this applies for any architecture, replacing aarch64 for any architecture supported by qemu (and your distro of choice): You can check /usr/bin/qemu-*-static
.
0 Comments
2 Pingbacks