Entries from 2025-04-01 to 1 month
To somehow run binaries compiled for Linux on Spike, I decided to start by establishing how to bring up Linux on Spike. Booting Linux on Spike requires the following. Build Spike Build the Linux kernel Use OpenSBI to build fw_jump.elf. Cre…
I'm trying to find some way to run a binary compiled for Linux on Spike. The procedure is as follows: Compile the user program with riscv64-unknown-linux-gnu-gxx. Prepare a Linux image and fw_jump.elf so that Linux can be booted. Create ro…
After a lot of investigation, it turned out that quite a few things are needed to get programs running on Whisper. To run on Whisper, programs basically need to be compiled with riscv64-unknown-elf-gxx. Judging from the GitHub page and fro…
Let's run a binary built with LLVM on Whisper. #include <stdio.h> int main(int argc, char **argv) { printf("Hello World\n"); if (argc > 1) { printf("%s\n", argv[1]); } return 0; } /home/msyksphinz/llvm/LLVM-20.1.2-Linux-X64/bin/clang --target=riscv</stdio.h>…
To run SPEC, I decided to try Whisper. Whisper is a simulator with as many options as Spike, if not more. github.com Build procedure: Before building Whisper itself, compile Boost first. curl -L https://archives.boost.io/release/1.88.0/sou…
I have uploaded my slides from the RISC-V Study Group to SpeakerDeck. speakerdeck.com Information about the RISC-V Study Group is here. risc-v.connpass.com This is an English translation of the original Japanese post: RISC-V勉強会 2025/04/…
Continuing my attempt to run RISC-V binaries on QEMU. I'll modify the setup a bit more so that execution on QEMU can be verified in one shot. all: perlbench sgcc mcf omnetpp xalancbmk x264 deepsjeng leela xz specrand include perlbench.mk i…
Continuing my attempt to run RISC-V binaries on QEMU. Let's compile for RISC-V using the LLVM configuration and run the binaries on QEMU. I'll add the run commands bit by bit. There is one thing to watch out for when running x264. BuckBunn…
Continuing my attempt to run RISC-V binaries on QEMU. Let's compile for RISC-V using the LLVM configuration and run the binaries on QEMU. I'll add the run commands bit by bit. Like this. SPEED_PERLBENCH_DIR = $(BASE_DIR)/600.perlbench_s SP…
This is a continuation of my attempt to run RISC-V binaries on QEMU. SPEC2017 is a suite widely used as a CPU benchmark. In this article, I work out the procedure for building SPEC2017 for the RISC-V architecture using the LLVM compiler. C…
This is a continuation of my attempt to run RISC-V binaries on QEMU. GCC crashes with the -O3 option, so let's try LLVM. Add the following to the config file. % define model --target=riscv64-unknown-linux-gnu -march=rv64gc --sysroot=/home/…
This is a continuation of my attempt to run RISC-V binaries on QEMU. The flow has more or less taken shape, so I'm going to prepare the commands. For perlbench, it looks something like this. cd /home/msyksphinz/spec2017/benchspec/CPU/502.g…
When working with multiple repositories in git, there are cases where you want to apply different settings to each repository. For example, you may want to use a different user name and email address for your personal repositories and your…
Next, I'll build the SPEC2017 binaries and try running them on a simulator or similar. To do that, I need to create a config for RISC-V. spec2017_work/config/myriscv.cfg : The differences from config/Example-gcc-linux-x86.cfg are as follow…
While looking into a few things, I found that git bundle seems handy for moving git repositories around or synchronizing the same repository that lives in multiple places, so I'm writing down how to do it. The bundle command lets you pack …