© 2024 by Zack Smith. All rights reserved.
Running ARM64 (aarch64) code in QEMU
If you don't own an ARM64 computer like a Raspberry Pi, an Apple Silicon based Mac, or a Snapdragon-based device, you can still run aarch64 code using QEMU and booting Debian Linux.
The following steps elucidate how to create an aarch64 Debian Linux based disk image and run it with QEMU. This approach does not support X-Windows however -- it's just text-based.
0. Install QEMU
sudo apt install qemu-system-arm qemu-efi-aarch64 qemu-utils |
1. Create two 64MB PFlash drives
The first one will be initialized with the QEMU EFI data.
dd if=/dev/zero of=pflash0.img bs=1M count=64 |
2. Create a large drive to hold Debian Linux.
To ensure it'll hold all of Debian without the GUI stuff let's make it 8 gigabytes. The minimum size is about 5 GB.
dd if=/dev/zero of=debian-aarch64.img bs=1G count=8 |
3. Fetch the latest Debian aarch64 image.
Download the DVD image from here:
4. Run QEMU to install Debian
#!/bin/bash |
5. Launch Debian aarch64
#!/bin/bash |