This project helps you build and run GNU/Linux Kernels for various PULP-based projects. The build flow is based on buildroot. To do further customizations study the buildroot user manual.
First make sure you have the following packets installed:
Requirements for AlmaLinux TBD
Requirements Ubuntu TBD
IIS Machines
Spawn a subshell with the required tools already installed by calling
riscv -riscv64-gcc-linux-gnu-11.2.0 bashNow build a target image containing OpenSBI, GNU/Linux and a rootfs by running the following commands:
# Initializes buildroot for your target platform
make setup
# Call buildroot's makefile based buildsystem
cd buildroot
make -j
# Workaround for issue https://github.com/pulp-platform/pulp-linux/issues/3
make opensbi-rebuildIf everything goes right you should find GNU/Linux and the combined OpenSBI + GNU/Linux image in
buildroot/output/images/.
The easiest way to do customizations such as adding/removing packages or enabling/disabling features is to call
make menuconfigin buildroot/.
To save this as a new configuration try make savedefconfig.
Make sure you flashed your FPGA with the target platform's bitstream.
First connect to the serial device port:
$ minicom -D /dev/ttyUSBXwhere X might be any number larger or equal to zero. Check with e.g. dmesg
on which port your serial device is exposed.
Open a Terminal and connect to your FPGA with OpenOCD:
$ openocd -f target/cheshire/cheshire.cfgThis will provide an endpoint GNU GDB can connect which you can by calling
$ riscv64-unknown-linux-gnu-gdb
# then in GDB
gdb> target extended-remote localhost:3333
gdb> load buildroot/output/images/fw_payload.elf
gdb> cIf you want to have debug symbols available during execution you can call
gdb> add-symbol-file buildroot/output/build/linux-6.7/vmlinux
gdb> add-symbol-file buildroot/output/images/fw_payload.elfbefore load ing fw_payload.elf.
TBD