Gentoo on BPI-F3

I’m completing the instructions on how to build an image for the bpi-f3 in Gentoo from the ground up:

  • u-boot and opensbi right now do not have an ebuild, I’m using the latest bianbu forks for them
  • linux-6.1.15 linux-6.6.63 + vendor support is also externally built, with patches to enable sensors.
  • I leveraged crossdev directly to make building all faster.

Since gcc-15 might autovectorize RVV1.0 I’ll try again making a very experimental image enabling the vector extension and setting the vl to 256 since that’s what the CPU supports.

Packages for 20250410

  • linux
    • 6.6.63+
  • glibc
    • Gentoo 2.41-r1 (patchset 2)
  • gcc
    • gcc-14 (Gentoo 14.2.1_p20250301 p8) 14.2.1 20250301
    • gcc-15 (Gentoo 15.0.1_pre20250406-r2 p53) 15.0.1 20250406 (experimental) → known broken for RVV sadly
  • clang
    • clang version 20.1.2
  • rust
    • rustc 1.85.1 (4eb161250 2025-03-15) (gentoo)
  • python
    • Python 3.12.10

Packages for 20250411 RVV tryout

  • linux
    • 6.6.63+
  • glibc
    • Gentoo 2.41-r1 (patchset 2)
  • gcc
    • gcc-14 (Gentoo 14.2.1_p20250301 p8) 14.2.1 20250301
    • gcc-15 (Gentoo 15.0.9999) 15.0.1 20250411 (experimental) → used to build all the other packages
  • clang
    • clang version 20.1.2
  • rust
    • rustc 1.85.1 (4eb161250 2025-03-15) (gentoo)
  • python
    • Python 3.12.10

Downloads:

EDIT: I removed the older images.

3 Likes

Cheers for your work. I got Gentoo working on mine a couple of days ago.

Thought id check your image out to see if I had missed anything obvious, but /etc/portage is empty? is this to be expected? I admit ive not booted it and just mounted it via kpartx to have a look but was curious.

Cheers

The image is incomplete since I wanted to make sure it booted and didn’t populate it with the bits catalyst adds, it is missing the make.conf since it got created as a crossdev experiment.

Hopefully I’ll manage to complete it during this weekend.

If you have a working rootfs you may just update the kernel and if you want to risk a bit more try rebuilding with CFLAGS=-O3 -march=rv64gcv_zvl256b.

Ah you mean -march=rv64gcv_zvl256b?

Quick question though, you had any luck getting X working? llvm 18 doesnt compile and 17 does but spits out a load of errors that I need to try and figure out.

Yes, typo.

I did not try to use the frame buffer at all so far. I’ll try building it soon.

The scripts I’m preparing are/will be in GitHub - lu-zero/crossdev-stages: Build Gentoo stages leveraging crossdev, but just using a standard stage3 and rebuilding as needed did work well.

1 Like

I got to test a bit more and I suggest to stay clear of rv64gcv_zvl256b, it seems to produce code that assumes it is ok to unaligned vector loads when it is not.

For those curious here is the upstream bug for gcc-14.

1 Like

I updated a bit the build scripts and I have a bit more complete image here, help in refining both the image and the scripts welcome, but it should work well enough to install Gentoo in the board.

here an up to date version based on bianbu-1.0.12, it should work on the 16GB-ram boards (if somebody can try please report back :)) Since the linux-6.6 version seems to have better performances I removed all the other images.

here the version sporting the linux-6.6 plus my patch to have the thermal sensors exposed Commits · lu-zero/pi-linux · GitHub

1 Like

Now with the 2.0rc6 bianbu bootloader and kernel, glibc-2.40, gcc-14.2.1_p20240817, clang-18.1.8.

Known issue make sure to run ldconfig.

1 Like

Since I produce also the binpackages here you can find those produced while assembling the image. It makes very quick to update an already running system.

I updated the image to the kernel bianbu 2.0rc7, now with clang-19.1.1, also the binpkgs moved to here

I updated it to bianbu 2.0, still make sure to run ldconfig once you boot,

1 Like

Now using the uboot and kernel 2.0.2 with a more recent clang and python

New update, now built with gcc-15!

Trying building with -O3 -march=rv64gcv_zvl256b now.

2 Likes

The current gcc snapshot managed to build pretty much all the packages besides curl, so please try the newest image just to test things.

1 Like