Installation
We provide two ways of building R-Visor:
- Installing with git: This requires you to set up the various dependencies
- Installing with docker: This is a quick and easy way to get started with R-Visor
With Git
The following dependencies are required to build R-Visor from git:
- QEMU
- RISC-V Glibc toolchain
- RISC-V Newlib toolchain
The steps to build each of these dependencies are shown below. However if you already have them installed, you can skip to Setting Up R-Visor
Setting Up QEMU
QEMU is an open-source emulator and virtualizer that allows you to run software for one hardware architecture on another. It is commonly used for system emulation, enabling developers to test, debug, and run software in a virtualized environment without needing physical hardware.
Our setup uses QEMU to emulate a RISC-V architecture, in order to use R-Visor on other architectures such as x86 or AArch64.
- First install the prerequisites
- First install the prerequisites
- Pull the QEMU sources from github
- Build QEMU
Setting Up The RISC-V Glibc Toolchain
- First install the prerequisites
- Next get the sources from GitHub
- Update the submodules
- Create the install directory
- Build the Glibc toolchain for RISC-V
- Add the toolchain to path
Setting Up The RISC-V Newlib Toolchain
- To setup the RISC-V newlib toolchain, follow steps 1 to 4 from Setting Up The RISC-V Glibc Toolchain
- Next, build the Newlib toolchain for RISC-V
Additional information can be found on the RISC-V GNU ToolChain's GitHub
Setting up R-Visor
First clone the R-Visor project from Github
Next build the project using CMake
Running this would create a binary named tlrvisor_bb in bin/. In order to execute the routine, run it with the target binary as an argument.
The output of the binary is printed out to the terminal and the resulting logs are stored in bb_frequency_logs.
With Docker
R-Visor's Docker image is a great way to get up and running in a few minutes, as it comes with all dependencies pre-installed. We include a dockerfile in the Github repo.
First clone the R-Visor project from Github
Build the image from the dockerfile
Run the image