Banana Pi BPI-F3
The Banana Pi BPI-F3 is an industrial-grade RISC-V single-board computer from Banana Pi, based on SpacemiT K1 SoC. It has an octa-core RISC-V (8 × X60) CPU, with integrated 2.0 TOPs AI computing power.
| Platform | Banana Pi BPI-F3 |
| Architecture | RV64GCVB |
| System-on-chip | SpacemiT K1 |
| CPU | X60 |
| seL4 virtualisation support | – |
| seL4 SMMU support | – |
| Proofs | – |
| Proof configs | – |
| seL4 CMake platform name | bananapi-f3 |
| Contributed by | Community |
| Maintained by | 10xEngineers |
Details and links to manuals can be found on the Banana Pi product page.
The SoC technical reference manual can be found on SpacemiT website.
The Banana Pi BPI-F3 arrives with the following boot process:
- Firmware starts
- OpenSBI starts
- U-Boot proper starts
From U-Boot proper you can then load and start an seL4 image, see below for details.
Building the GCC toolchain
It is recommended to build the toolchain from source.
git clone https://github.com/riscv/riscv-gnu-toolchain.git
cd riscv-gnu-toolchain
git submodule update --init --recursive
export RISCV=/opt/riscv
./configure --prefix="${RISCV}" --enable-multilib
make linux
After it is built, add the $RISCV/bin folder to your PATH. The built
toolchain works for both 32-bit and 64-bit.
Alternatively, any pre-built toolchain with multilib enabled should work.
Building seL4test
Checkout the sel4test project using repo as per seL4Test
repo init -u https://github.com/seL4/sel4test-manifest.git
repo sync
mkdir cbuild
cd cbuild
../init-build.sh -DPLATFORM=bananapi-f3 -DRISCV64=1
# The default cmake wrapper sets up a default configuration for the target platform.
# To change individual settings, run `ccmake .` and change the configuration
# parameters to suit your needs.
ninja
Generated binaries can be found in the images/ directory.
Booting
There are multiple ways to boot from U-Boot, documented below is booting via TFTP and from a microSD card.
Obtaining the DTB
Since we are using a uImage for the Banana Pi BPI-F3, U-Boot requires a Device Tree Blob (DTB) alongside
the binary image to boot.
The Device Tree Source (DTS) can be compiled from the seL4 tree with the Device Tree Compiler (dtc):
dtc -I dts -O dtb sel4/tools/dts/bananapi-f3.dts > bananapi-f3.dtb
Booting via microSD card
These instructions expect the microSD card to be paritioned with FAT.
The microSD card slot registers as device 0 in U-Boot so to see if the device
is recognised run:
mmc dev 0
# Check that the card info is expected
mmc info
# List partitions
mmc part
To load and run the image:
fatload mmc 0:<PARTITION> 0x200000 sel4test-driver-image-riscv-bananapi-f3
fatload mmc 0:<PARTITION> 0x31000000 bananapi-f3.dtb
bootm 0x200000 - 0x31000000
Booting via TFTP
If you have setup a TFTP server, enter the following commands on the U-Boot console to load an image via the network.
dhcp
tftpboot 0x200000 <YOUR_TFTP_SERVER_IP_ADDRESS>:sel4test-driver-image-riscv-bananapi-f3
tftpboot 0x31000000 <YOUR_TFTP_SERVER_IP_ADDRESS>:bananapi-f3.dtb
bootm 0x200000 - 0x31000000