Jump to content

[Armbian build PR] - [v3] Add new RISCV family "SpacemiT" and board BananaPi F3


RSS Bot

Recommended Posts

Description

Please note that this PR does not merge to main, but to another branch for collaboration. This is a continuation of v2: https://github.com/armbian/build/pull/6800

@pyavitz has already done a nice job in v1 and v2 of this PR. Based on this work, I have put a lot of effort in trying to bring this new board family more in line with existing families as well as trying to improve maintainability for the long term. Another concern with v2 was the sheer size of the PR (~55MB which amounts to almost 10% of the repo or ~2.4 million LOC which amounts to over 50% of the current repo). v3 brings down this size considerably, to a more sane number:

v2 v3 Shrinkage
Lines of code 2 402 910 495 249 ~80%
PR size ~ 55 MB ~17.5 MB ~66%

This is possible due to using external repos for e.g. WiFi driver and vendor kernel instead of completely patching it in.

Other than that, changes from v2 to v3:

  • Include all improvements from @pyavitz into the original files/commits
  • Use boot source directly from vendor -> only few patches needed
  • Use vendor kernel source for legacy --> only few patches needed
  • Use our own repo for RTL8852BS WiFi driver --> no patch needed (was huge before)
  • Revise commit messages
  • Downgrade BananaPi F3 to CSC since @pyavitz does not plan to be a maintainer
  • Other little fixes and improvements like using our dt auto-patcher to make it easy to develop and add new boards

Please see the commit messages for more details.

To-Do

I left all functionality as before, so both legacy and current kernels are still there along with the other stuff. We still need to think about whether it makes sense to keep both unless a maintainer wants to step up. But with the v3 changes, legacy and U-Boot will be a breeze to maintain.

  • [ ] Rewrite kernel patches after they're "done" and not changing much anymore (feel free to add more tasks)

How Has This Been Tested?

  • [x] ./compile.sh kernel BOARD=bananapif3 BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=no EXPERT=yes KERNEL_CONFIGURE=no RELEASE=noble
  • [x] ./compile.sh kernel BOARD=bananapif3 BRANCH=legacy BUILD_DESKTOP=no BUILD_MINIMAL=no EXPERT=yes KERNEL_CONFIGURE=no RELEASE=noble
  • [x] ./compile.sh uboot BOARD=bananapif3 BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=no EXPERT=yes KERNEL_CONFIGURE=no RELEASE=noble
  • [x] ./compile.sh build BOARD=bananapif3 BRANCH=legacy BUILD_DESKTOP=no BUILD_MINIMAL=no EXPERT=yes KERNEL_CONFIGURE=no RELEASE=noble
  • [ ] Test flashing image with legacy kernel
  • [ ] Test flashing image with current kernel

Information on BananaPi F3

(Following info by @pyavitz from v2)

Bluetooth firmware added to armbian/firmware. esos.elf added to: packages/blobs/riscv64/spacemit/

https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 https://gitee.com/bianbu-linux

Flashing u-boot to eMMC: (This is not apart of the PR and needs to be added in the future.)

echo 0 > /sys/block/mmcblk2boot0/force_ro
sleep .50
dd if="bootinfo_emmc.bin" of="/dev/mmcblk2boot0" bs=512 conv=notrunc
dd if="FSBL.bin" of="/dev/mmcblk2boot0" bs=512 seek=1 conv=notrunc
dd if="FSBL.bin" of="/dev/mmcblk2boot0" bs=512 seek=512 conv=notrunc
dd if="fw_dynamic.itb" of="/dev/mmcblk2" bs=512 seek=1280 conv=notrunc
dd if="u-boot.itb" of="/dev/mmcblk2" bs=512 seek=2048 conv=notrunc
sync

Tested: Bluetooth and Wifi (useless without an ANT) (bluetooth is iffy) Ethernet (1 and 2) PCIe USB HDMI (LEGACY) Debug UART

NOTE: One major difference between this build and the others available else where is the use of SYSLINUX/EXTLINUX instead of the ENV file.

BUGS: HDMI currently broke on CURRENT. The screen just displays red.

[    5.132172] [drm:dpu_init] *ERROR* dpu_init wait cfg ready done timeout
[    5.132883] [drm:dpu_isr] *ERROR* Under Run! DPU_Mclk = 0, DPU BW = 0

View the full article

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines