Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1 @@
../linux/linux.hash

View File

@@ -0,0 +1,2 @@
# From https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256 fce3ee728712ed063aa8c14a8756c8ff8c7a46ba3827f61d2b04a73c7cf5dd9e linux-6.6.35.tar.xz

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 d11702103f177a2914e94eec57ce5ed820296d874f6b6525c4482e55d71a3667 opensbi-1.6.tar.gz

View File

@@ -0,0 +1,30 @@
Linux on Spike RISC-V 32-bit ISA simulator
==========================================
This configuration provides a minimal working setup to run a Linux
kernel in the Spike RISC-V ISA simulator.
The Spike ISA simulator can be an interresting alternative to Qemu, in
some specific cases. For example: simulating new instructions (see [1]),
simulating riscv-openocd/gdb debug sessions (see [2], [3]), or
generating an accurate per-instruction log of execution (see
riscv-isa-sim spike -l option)...
To run Buildroot Linux in Spike, use the commands:
make spike_riscv32_defconfig
make
./board/spike/riscv32/start.sh
The boot is made with the standard RISC-V OpenSBI boot loader. In
order to keep the simulation simple, the rootfs is passed as an initrd
ramfs.
[1].
https://github.com/riscv-software-src/riscv-isa-sim/tree/v1.1.0#simulating-a-new-instruction
[2].
https://github.com/riscv-software-src/riscv-isa-sim/tree/v1.1.0#debugging-with-gdb
[3].
https://github.com/riscv-collab/riscv-openocd

23
board/spike/riscv32/start.sh Executable file
View File

@@ -0,0 +1,23 @@
#! /bin/sh
SCRIPT_DIR="$(dirname "$0")"
BR_BASEDIR="$(readlink -e "${SCRIPT_DIR}/../../..")"
# spike uses dtc at runtime startup, so make sure buildroot host
# directory is in the PATH
export PATH="${BR_BASEDIR}/output/host/usr/bin:$PATH"
# Use Buildroot host spike by default, but allow the caller to
# redefine another spike binary
: "${SPIKE:=spike}"
# Note 1: Kernel with initrd fail to boot on riscv32 when the system
# has more than 1GB of RAM. So we set exactly this amount of RAM.
# Note 2: The default spike ISA is RV64IMAFDC_zicntr_zihpm, so we need
# to force the RV32 ISA here.
exec "${SPIKE}" \
-m1024 \
--initrd "${BR_BASEDIR}"/output/images/rootfs.cpio \
--isa="RV32IMAFDC_zicntr_zihpm" \
"${@}" \
"${BR_BASEDIR}"/output/images/fw_payload.elf