README.md
1RISC-V Proxy Kernel and Boot Loader
2=====================================
3
4About
5---------
6
7The RISC-V Proxy Kernel, `pk`, is a lightweight application execution
8environment that can host statically-linked RISC-V ELF binaries. It is
9designed to support tethered RISC-V implementations with limited I/O
10capability and and thus handles I/O-related system calls by proxying them to
11a host computer.
12
13This package also contains the Berkeley Boot Loader, `bbl`, which is a
14supervisor execution environment for tethered RISC-V systems. It is
15designed to host the RISC-V Linux port.
16
17Build Steps
18---------------
19
20We assume that the RISCV environment variable is set to the RISC-V tools
21install path, and that the riscv-gnu-toolchain package is installed.
22Please note that building the binaries directly inside the source
23directory is not supported; you need to use a separate build directory.
24
25 $ mkdir build
26 $ cd build
27 $ ../configure --prefix=$RISCV --host=riscv64-unknown-elf
28 $ make
29 $ make install
30
31Alternatively, the GNU/Linux toolchain may be used to build this package,
32by setting `--host=riscv64-unknown-linux-gnu`.
33
34By default, 64-bit (RV64) versions of `pk` and `bbl` are built. To
35built 32-bit (RV32) versions, supply a `--with-arch=rv32i` flag to the
36configure command.
37
38The `install` step installs 64-bit build products into a directory
39matching your host (e.g. `$RISCV/riscv64-unknown-elf`). 32-bit versions
40are installed into a directory matching a 32-bit version of your host (e.g.
41`$RISCV/riscv32-unknown-elf`).
42
43OpenBSD Build Steps
44-------------------
45
46Install the riscv-gnu-toolchain, and follow generic build steps.
47
48 # pkg_add riscv-elf-binutils riscv-elf-gcc riscv-elf-newlib
49
50
51