My configuration and scripts to build and run the RISC-V Linux kernel (rev 1.9) on RISC-V QEMU.

Running an unattended build

~$ wget javiermunhoz.com/.../risc-v-linux-on-qemu-scripts-rev-1.9.tar.gz
~$ tar zxvf risc-v-linux-on-qemu-scripts-rev-1.9.tar.gz
risc-v-linux-on-qemu-scripts-rev-1.9/
risc-v-linux-on-qemu-scripts-rev-1.9/linux-4-6-2-config
risc-v-linux-on-qemu-scripts-rev-1.9/busybox-1-26-2-config
risc-v-linux-on-qemu-scripts-rev-1.9/build-risc-v-on-qemu-rev-1.9.sh
~$ cd risc-v-linux-on-qemu-scripts-rev-1.9 && \
> sed -i 's%/home/user%/home/johndoe%g' build-risc-v-linux-on-qemu-rev-1.9.sh
~risc-v-linux-on-qemu-scripts-rev-1.9$ . build-risc-v-linux-on-qemu-rev-1.9.sh

Booting Linux on top of QEMU

~$ qemu-system-riscv64 -kernel $RISCV_TOP_PATH/riscv-tools/riscv-pk/build/bbl \
> -nographic -m 2048M

Booting output available here.

Comments

comments powered by Disqus