Commit Briefs

Benjamin Stürz

tools: destruct: bump to 0.6.2 (main)


Benjamin Stürz

tools/Makefile: bump destruct to 0.5


Benjamin Stürz

tools/Makefile: add clean-oksh rule


Benjamin Stürz

tools/Makefile: don't try to strip oksh


Benjamin Stürz

fix gensyscalls for GNU awk


Benjamin Stürz

tools: update dependencies


Benjamin Stürz

fix tools/Makefile


Benjamin Stürz

tools/Makefile: add missing dependencies


Benjamin Stürz

add broken busybox


Benjamin Stürz

destruct timespec


Branches



Tags

This repository contains no tags

Tree

.gitignorecommits | blame
Makefilecommits | blame
READMEcommits | blame
TODOcommits | 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

# 64-Bit Linux Userspace RISC-V 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
1. Build the toolchain:

  $ cd tools && make -jN	# with N being the number of cores of your system

2. Build the emulator itself and a few example programs:

  $ cd .. && make

3. Build a additional example programs (optional):

  $ cd tools && make extra

To run a test program do:

  $ make run

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

- amd64
- arm64
- riscv64
- powerpc64 (big-endian, some syscall support missing)

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)
- texinfo
- 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)
- gcc (only on FreeBSD/powerpc64, because the distribution clang is broken)

## 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>.