Commit Briefs

Benjamin Stürz

Port to arm64 (main)


Benjamin Stürz

Add clang dep for NetBSD


Benjamin Stürz

Update README


Benjamin Stürz

Add support for NetBSD


Benjamin Stürz

fix 'make test'


Benjamin Stürz

Fix config.mk.Linux


Benjamin Stürz

Use PRIx64 macros instead of llx


Benjamin Stürz

More fixed for FreeBSD


Benjamin Stürz

Add support for Linux hosts


Benjamin Stürz

Fix compilation on FreeBSD


Branches


Tags

This repository contains no tags

Tree

.gitignorecommits | blame
Makefilecommits | blame
READMEcommits | blame
config.mkcommits | blame
config.mk.FreeBSDcommits | blame
config.mk.Linuxcommits | blame
config.mk.NetBSDcommits | blame
config.mk.OpenBSDcommits | blame
examples/
src/
test.txtcommits | blame
tools/

README

# RISC-V 64-Bit Linux Userspace Emulator
This emulator allows you to run statically-compiled binaries for riscv64-unknown-linux-musl.
The goal is to support most POSIX-compatible OS on most 64bit CPU architectures.

## Instructions
Building rvemu is very simple, just do:

  $ make rvemu

To install rvemu, do:

  # make [PREFIX=/usr/local] install

If you don't already have a toolchain, you can build it with:

  $ make -C tools -j8

To run a test program do:

  $ make run

Look into the examples directory, for example programs.
You can specify which example to run with the T parameter.
Example for the cat.elf program:

  $ make T=cat run

## Supported Host Architectures
Due to design decisions, only 64bit archs can be supported:

- amd64
- arm64

Note: Once I get more hardware, I can port it to other architectures.

## Supported Host OSs
- OpenBSD
- FreeBSD
- NetBSD
- Linux

## Non-standard Toolchain Dependencies
- gsed (GNU sed)
- gmake (GNU make)
- sudo or doas (only for `make run`, see config.mk.*)
- wget or curl (only on Linux)
- clang (only on NetBSD, because the distribution gcc is too old)

## Resources
- https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf
- https://five-embeddev.com/riscv-isa-manual/latest/instr-table.html


## Bugs
This project is still very experimental and has bugs!
If you find one, please contact Benjamin Stürz <benni AT stuerz DOT xyz>.