Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

env.sh

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.

What this sets up

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 emulation
  • riscv64-elf-gcc + riscv64-elf-binutils, bare-metal (ELF) cross toolchain: compiler, assembler, linker
  • riscv64-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.

Requirements

  • Arch Linux (or an Arch-based distro with pacman)
  • sudo privileges

Usage

sudo ./env.sh

The 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

Status

Early stage. This README and the setup script will be updated as the project's environment requirements grow.

About

Development environment setup script for a custom RV64 bootloader/OS project, built from scratch targeting bare-metal RISC-V on QEMU.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages