发现最新的 Fedora-38 上已经包含了 qemu-system-loongarch64, 这样的话我就可以直接在 x86_64 上体验 loongarch64 的发行版了 : )
参考网上其他人的分享成功启动安装了 孙海勇 兄制作的 livecd-fedora-mate-4.loongarch64.iso
不过由于是纯软件的指令翻译,会比较慢一些。
平台信息和操作步骤如下:
Host:
Fedora-38 / CPU: R7-5700G / disk: ssd / ram: 32G
command lines:
#https://raw.githubusercontent.com/loongson/Firmware/main/LoongArchVirtMachine/edk2-loongarch64-code.fd #does not work
#https://raw.githubusercontent.com/yangxiaojuan-loongson/qemu-binary/main/QEMU_EFI.fd #does not work
#https://mirrors.pku.edu.cn/loongarch/archlinux/images/QEMU_EFI_7.2.fd #works
uefi_url=https://mirrors.pku.edu.cn/loongarch/archlinux/images/QEMU_EFI_7.2.fd
iso_url=http://mirrors.wsyu.edu.cn/fedora/linux/development/rawhide/Everything/loongarch64/iso/livecd-fedora-mate-4.loongarch64.iso
curl -L -o ~/Downloads/${uefi_url##
/}
${uefi_url}
curl -L -o ~/Downloads/${iso_url##/} ${iso_url}
qemu-img create -f qcow2 ~/f38-la64.qcow2 64G
qemu-system-loongarch64 -vga std
-bios ~/Downloads/
${uefi_url##*/} \
-m 16G \
-smp 4 \
-nic user \
-serial stdio \
-device virtio-gpu-pci \
-device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
-hda ~/f38-la64.qcow2 \
-cdrom ~/Downloads/${iso_url##*/}
-boot once=d
安装成功后,再重新启动就不需要 -cdrom -boot 选项了:
qemu-system-loongarch64 -vga std
-bios ~/Downloads/${uefi_url##*/}
-m 16G
-smp 4
-nic user
-serial stdio
-device virtio-gpu-pci
-device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2
-hda ~/f38-la64.qcow2