File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ IMG=archarm-rpi-aarch64.img
4+ LOOP=$( sudo losetup --find --show --partscan " $IMG " )
5+ ROOT_UUID=$( sudo blkid -s PARTUUID -o value " ${LOOP} p2" )
6+ BOOT_UUID=$( sudo blkid -s PARTUUID -o value " ${LOOP} p1" )
7+ KERNEL=/mnt/arch-boot/Image
8+ sudo mount " ${LOOP} p1" /mnt/arch-boot
9+ sudo mount " ${LOOP} p2" /mnt/arch-root
10+
11+ qemu-system-aarch64 \
12+ -M virt -cpu max -m 8192 -display none \
13+ -kernel " $KERNEL " \
14+ -drive file=" $IMG " \
15+ -serial stdio -monitor none \
16+ -nic user,model=virtio-net-pci,hostfwd=tcp::2222-:22 \
17+ -append " earlycon=pl011,0xfe201000 console=ttyAMA0,115200 root=PARTUUID=${ROOT_UUID} rootfstype=ext4 rw rootwait fsck.repair=yes"
18+
19+ sudo umount /mnt/arch-boot
20+ sudo umount /mnt/arch-root
21+ sudo losetup -D
You can’t perform that action at this time.
0 commit comments