Home

Awesome

RVVM - The RISC-V Virtual Machine

Language grade: C/C++ version RISC-V Logo

RISC-V CPU & System software implementation written in С

What's working

Tell me more...

Building

Currently builds using GNU Make or CMake and tested on Linux, Windows, FreeBSD and MacOS systems. More build targets are going to be supported.

git clone https://github.com/LekKit/RVVM
cd RVVM
make
cd release.linux.x86_64

To cross-compile, pass CC=target-gcc and OS=target-os if the target OS differs from your host to make. You can configure the build with use flags

Examples:

make CC=aarch64-linux-gnu-gcc OS=linux ARCH=arm64 USE_FB=0 USE_NET=1 USE_JIT=1
make CC=aarch64-linux-android21-clang ARCH=arm64 OS=android USE_JIT=1
make CC=x86_64-w64-mingw32-gcc OS=windows ARCH=x86_64 USE_JIT=1
make ARCH=i386 CFLAGS=-m32

Alternatively, you can use CMake (hint, build binaries are not host arch suffixed):

git clone https://github.com/LekKit/RVVM
cd RVVM
mkdir build
cmake -S. -Bbuild
cmake --build build --target all
cd build

Running

./rvvm_x86_64 fw_jump.bin -kernel linux_Image -image rootfs.img -rv64 -mem 2G -smp 2 -res 1280x720

Argument explanation:

fw_jump.bin            Initial firmware, OpenSBI in this case
-kernel linux_Image    Kernel Image to be booted by SBI, etc
-image rootfs.img      Hard drive image to be mounted as rootfs
-rv64                  Enable RV64, RV32 is used by default
-mem 2G                Memory amount (may be suffixed by k/M/G), default 256M
-smp 2                 Amount of cores, single-core machine by default
-res 1280x720          Changes framebuffer & VM window resolution

Invoke "./rvvm_x86_64 -h" to see extended help.

Our team

TODO