Last active
April 25, 2021 16:28
-
-
Save stevemk14ebr/f19f5ef305c2ea4cad7cb3d29ca0bf5b to your computer and use it in GitHub Desktop.
Qemu aarch64 setup on a debian host OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do this: https://web.archive.org/web/20200909020002/https://blahcat.github.io/2018/01/07/building-a-debian-stretch-qemu-image-for-aarch64/ | |
# Mount qcow2 via this instead of qemu-nbd: | |
# qemu-img convert -f qcow2 image.qcow2 -O raw image_raw.raw | |
# sudo losetup /dev/loop0 image_raw.raw | |
# sudo kpartx -a /dev/loop0 | |
# sudo mkdir /mnt/image && sudo mount /dev/mapper/loop0p1 /mnt/image | |
qemu-system-aarch64 -smp 2 -M virt -cpu cortex-a57 -m 1G \ | |
-initrd initrd.img-4.19.0-10-arm64 \ | |
-kernel vmlinuz-4.19.0-10-arm64 \ | |
-append "root=/dev/sda2 console=ttyAMA0" \ | |
-global virtio-blk-device.scsi=off \ | |
-device virtio-scsi-device,id=scsi \ | |
-drive file=disk.qcow2,id=rootimg,cache=unsafe,if=none \ | |
-device scsi-hd,drive=rootimg \ | |
-nographic -netdev user,id=vmnic,hostfwd=tcp::2222-:22 -device virtio-net-device,netdev=vmnic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment