Development environment setup script for a custom RV64 bootloader/OS project, built from scratch targeting bare-metal RISC-V on QEMU.
This repo currently holds a single setup script. It's expected to grow as the project's tooling needs change, treat it as living infrastructure, not a one-off.
The target environment is a bare-metal RISC-V system with no BIOS/OpenSBI, running on QEMU's virt machine, starting in M-mode.
env.sh installs:
qemu-system-riscv, RISC-V system emulationriscv64-elf-gcc+riscv64-elf-binutils, bare-metal (ELF) cross toolchain: compiler, assembler, linkerriscv64-elf-gdb, debugger, for attaching to QEMU's GDB stub
Then it verifies each install and confirms the virt machine type is available in the installed QEMU build.
- Arch Linux (or an Arch-based distro with
pacman) sudoprivileges
sudo ./env.shThe script must be run with sudo, it checks for this and exits with an error if it isn't. Package installs use --needed, so it's safe to re-run; already-installed packages are skipped. They also run with --noconfirm, so pacman won't prompt for confirmation.
Expected output on success:
QEMU installed: QEMU emulator version X.Y.Z
GCC for RISC-V 64 installed: riscv64-elf-gcc (GCC) X.Y.Z
GDB for RISC-V 64 installed: GNU gdb (GDB) X.Y
QEMU Virtual Machine for RISC-V 64: RISC-V VirtIO board
Early stage. This README and the setup script will be updated as the project's environment requirements grow.