Boot an Arch Linux RISC-V using qemu-system

TL;DR

This approach requires you to be on a non-RISC-V Arch Linux (x86_64 or aarch64, etc.) machine, because we use pacstrap and pacman .

 1
2
3
4
5
6
7
 # pacman -Syu then reboot is recommended before this
sudo pacman -S arch-install-scripts git qemu-img qemu-system-riscv riscv64-linux-gnu-gcc
git clone https://github.com/CoelacanthusHex/archriscv-scriptlet.git
cd archriscv-scriptlet
./mkrootfs
./mkimg
./startqemu.sh

If, in the last step, you find yourself stuck at [ OK ] Reached target Graphical Interface for over 5 minutes, just press Ctrl-C and re-run startqemu.sh .

After booting the machine, you may need to install necessary packages:

 1
 sudo pacman -S git vim gcc

Detailed Explanation

TBD after my final examination ends (!)

Source: https://blog.jiejiss.com/

This article is transferred from https://blog.jiejiss.com/Boot-an-Arch-Linux-RISC-V-using-qemu-system/
This site is only for collection, and the copyright belongs to the original author.