Talk:How to install Gentoo on Raspberry Pi 5

From Gentoo Wiki
Jump to:navigation Jump to:search

Bug 930269

This bug has been closed. Is the clone still needed, or is emerge sufficiant, and if so is it okay to update the section Install kernel, modules and firmware with this? Btw thanks for this article. It's very appreciated!

Proposed update:

1. Emerge raspberry-firmware, kernel, and sources

root #emerge --ask sys-kernel/raspberrypi-sources sys-boot/raspberrypi-firmware sys-kernel/raspberrypi-image

Firmware install

Thanks for making this guide, I'd recommend using this method for installing the firmware: Raspberry_Pi4_64_Bit_Install#Raspberry_Pi_Firmware

I plan on adding the changes I made to this page: Raspberry_Pi_Install_Guide

It would be nice if there were one single wiki page for all of the Pis, maybe with subpages for device specific instructions.

Many of the people who work on these pages are active in #gentoo-arm and #gentoo-wiki on libera.

- Zen desu (talk) 16:54, 21 January 2024 (UTC)

Why manually install firmware?

There already are firmware package for raspberry pi Wi-Fi sys-firmware/raspberrypi-wifi-ucode. In fact, it seems to be from the same source as this guide points to. Is there a reason to install firmware manually instead of using this package?

There is also sys-boot/raspberrypi-firmware which is a package for the raspberry pi bootloader.

Having these as packages would mean users would recieve updates automatically for them, mittigating security risks. I will soon have an opportunity to install gentoo on the pi 5, and if i were to make everything work just with the packages i will edit the page accordingly.

— The preceding unsigned comment was added by Jacob (talkcontribs) 2024-03-04

I'm not sure who wrote this because you didn't sign your message, but it looks like at least firmware version 20240306 is required to boot the Raspberry Pi 5. Unfortunately, that version is not yet in Portage at the time of this writing. I filed bug #930269 to get this addressed. —JGaz (talk) 03:19, 20 April 2024 (UTC)

stage3 / Portage Latest Snapshot Links

Fantastic walk-through, thanks.

The only quirk for my RasPi5 was that the swap pagesize wasn't accepted as 16k, and instead mkswap on the RasPi5 itself used a 4k bytes pagesize.


Please add a link for where to find the stage3 latest release? (https://distfiles.gentoo.org/releases/arm64/autobuilds/current-stage3-arm64-openrc/)

Similarly so for the latest portage snapshot? (https://distfiles.gentoo.org/snapshots/portage-latest.tar.xz)


And for an aside, my preference is to use f2fs for the main partition (root partition), in the hope of reducing wear on the sdcard. Setting f2fs for the formatting, in the fstab, and on the boot cmdline, all just simply worked.


All very good and worked first time!

Thanks,
Martin

Connect via UART

Thanks for this guide. Very fast installation without cross compilation.

If no monitor and keyboard are connected to RPi5, it is possible to connect via UART and setup all needed packages, wifi connection, etc.

It is needed to add lines

FILE /boot/config.txt
dtparam=uart0
dtparam=uart0_console
FILE /boot/cmdline.txt
console=serial0,115200
FILE /etc/inittab
f0:12345:respawn:/sbin/agetty 115200 ttyAMA0 vt100

After that it is possible to connect UART to USB converter to pins 6(GND), 8 (TXD) and 10 (RXD) and connect to console using minicom

Aruslantsev (talk) 18:08, 20 March 2025 (UTC)


Necrose99 (talk) 15:15, 12 June 2025 (UTC)necrose99 https://github.com/worproject/rpi5-uefi while the project is recently archived , it still works hopefully RPI firmware taskforce or others take it over. boots windows 11 Linux etc.. (Uboot binaries/EDK2 are baked into the fd file) however you will Likely need to update the eprom also. [[1]] or those on sdcard ie Raspbian Linux ,

for NVME one can use stock Raspbian SD card to make a gpt.

  • /boot/efi and copy this firmware their of. the config.txt boots the UEFI bios like menu...

config.txt points to *.fd take care when editing it.

can pick options or enable grub2 which makes it more alike a desktop can test more kernels. gentoo-binkernel etc. HomeAssistant-kerel etc.

  • /boot/ 550- or so.
  • /root genpi64 images had btrfs , you can always use most anything else. too ie btrfs etc.

Dracut gentoo installkernel , grub2 or systemD-boot the uefi firmware unlocks more possibilities.

in fact, I surmise one could loop mount the minimal iso for arm64 and @/mnt/gentoo unpack the squashfs to root and likely chroot to it. likely saving some work. as it has grub2... EG. sudo unsquashfs -d /mnt/gentoo /mnt/gentoo-cd/*.squashfs

I have stock HomeAssistant on 16 GB rpi5 , however its performance leaves to be desired. thankfully theirs a gentoo overlay HomeAssistant I aim to test it on nvme 550MiB I have lying around. soon. namely I cant control the rootfs over ssh ie add hw. hats etc. or add AI boards eg: https://github.com/axelera-ai-hub/voyager-sdk however for my dual NMVE underhat I need an [NVMe SSD Extension Cable Extender/adapter] to move the AI card as the Heatsink and fan are "Chonkey" as well I have a LoRaWAN Hat.. were as the base os use many dockers and stuff can break. as sometimes images fail to launch.

can make also

  • # Create Btrfs subvolume for swap
  • btrfs subvolume create /mnt/gentoo/@swap
  • sudo chattr +C /mnt/gentoo/@swap
  • sudo btrfs property set /mnt/@swap compression none
  • sudo fallocate -l 8G /mnt/gentoo/@swap/swap.img