We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
So I'm using an x86-64 host machine with linux and I want to test if some userspace program I'm writing works on an ARM AArch64 guest, also running linux.
What would be my easiest option the achieve this? QEMU + some ARM-compatible distro? I thought of using ArchLinuxARM + QEMU but their images are preconfigured for already existing devices and chipsets in the real world so I'm not sure how to go about https://tutuappx.com/ installing it as I have no QEMU experience at all.
Any guidance would be much appreciated.
If your requirements are not specific to a particular hardware device, qemu provides an aarch64 virt virtual machine, for which you should be able to find tutorials/steps that can help you set it up. There might be distros, for e.g. Alpine Linux, which provide a pre-built image targeting virtual machines.
If you can build your application with the libc and other libraries statically compiled (i.e. one large executable containing your application and *all* its dependencies), then you can try the user-mode emulation of aarch64 provided by Qemu - aarch64-linux-user. This will help you save the time and effort required to set up a full-fledged system. If the application uses X-server/Wayland/GUI, etc. that might not work, though I cannot say that for sure.
A full-fledged virtual machine is likely to be slow, since Qemu must rely on pure emulation without any hardware/KVM support.
If you have a aarch64 capable hardware, such as RPi 3, 4 or similar, you can install Linux on it and carry out the testing there.
There might also be cloud-providers who provide aarch64 KVM-based VMs, though they might charge you for using their facilities.
Edit: Qemu also provides a system-level emulation of Rpi 1, 2, 3, and a few other machines, in addition to the generic virt machine.