From Fedora Project Wiki

Banana Pi BPI-F3

Flash U-Boot to the emmc

This image can be helpful for locating components https://docs.banana-pi.org/bpi-f3/banana_pi_bpi-f3_interface_new.jpg

  • Download the latest .zip (not .img.zip) from http://archive.spacemit.com/image/k1/version/bianbu/
  • Extract the files from the archive
  • Connect your serial cable to UART0 Debug
  • Hold down the FDL button (Labeled SW2) while connecting a USB-C cable from your computer to the 12V USB-C port on the BPI-F3
  • fastboot should display a dfu-device
$ fastboot devices
dfu-device	 DFU download
  • And the serial console should show Controller Run
fastboot stage factory/FSBL.bin
fastboot continue
sleep 1
fastboot stage u-boot.itb
fastboot continue

fastboot flash gpt partition_universal.json
fastboot flash bootinfo factory/bootinfo_emmc.bin
fastboot flash fsbl factory/FSBL.bin
fastboot flash env env.bin
fastboot flash opensbi fw_dynamic.itb
fastboot flash uboot u-boot.itb

Now if you reboot you should be presented with a u-boot prompt.

udev rules

If you get a warning that you cannot access the device, create /etc/udev/rules.d/99-bianbu-dfu.rules with:

SUBSYSTEM=="usb", ATTR{idVendor}=="361c", ATTR{idProduct}=="1001", MODE="0666", GROUP="plugdev"

Then make sure you're in plugdev, and reload udev rules:

sudo udevadm control --reload-rules && sudo udevadm trigger

Configure u-boot

  • Run the following commands
setenv product_name k1-x_deb1
setenv fdt_addr_r 0x31000000
setenv bootcmd 'nvme scan; load nvme 0:2 ${fdt_addr_r} dtb/spacemit/${product_name}.dtb; load nvme 0:1 ${kernel_addr_r} EFI/fedora/shimriscv64.efi; bootefi ${kernel_addr_r} ${fdt_addr_r}'
saveenv
  • Alternatively if you want to boot from sd card you can set the bootcmd like so
setenv bootcmd 'load mmc 0:2 ${fdt_addr_r} dtb/spacemit/${product_name}.dtb; load mmc 0:1 ${kernel_addr_r} EFI/fedora/shimriscv64.efi; bootefi ${kernel_addr_r} ${fdt_addr_r}'

Write Fedora to storage

Install the storage in your BPI-F3 and boot