I have been looking for information on FCOS and kernel device trees - specifically for CoreOS running on RPi4. Fedora minimal on an RPi4 places the upstream device tree files in /boot/dtb-xxx where xxx references a specific kernel version. Are device trees supported in FCOS? I have in mind the upstream device tree patch that enables the RPi4 POE fan to work. This device tree patch and the fan has been useful with my home lab RPi4 cluster to help keep the boards cool. Is there any information available?
I added some documentation for running FCOS on the Raspberry Pi 4 here. It doesn’t quite touch on adding various HATs but basically if you follow the U-Boot instructions you can then edit the
config.txt file in there to select another device tree to load.
Maybe the one you’re looking for is
rpi-poe.dtbo? I think you would need to change
[pi4] section in
config.txt to have
Thanks Dusty. I am very glad to see the RPi 4 documentation. I have a small cluster of RPi4s at home with Fedora minimal installed and running a generic K8s cluster. I have been experimenting on and off with Fedora CoreOS but struggling to get device trees to work with the UEFI firmware. I also had the same device tree problem with Fedora minimal and the UEFI firmware. Part of the problem was that device tree support was broken for a while in the UEFI stack and part of the problem was me missing the System Table setting in the UEFI menu since I was running everything headless.
I use the POE Hat on my RPi4s with the kernel module driver that showed up in the 5.13 kernel (pwm_raspberrypi_poe). This driver does not yet have a device tree overlay, so the upstream device tree for RPi4 needs to be patched (see pi 4 - How can I enable the fan on the official POE HAT under fedora? - Raspberry Pi Stack Exchange for a write up on how I approached this).
With Fedora minimal, i can use uboot or UEFI to boot and load the patched upstream device tree so the POE fans on my cluster hum away nicely. I will use your information to try and get the POE Hat fan working well with CoreOS. The rpi-poe overlay you mention requires a kernel module that exists in Raspian OS but is not in the mainline kernel Fedora uses.
More to come. I really appreciate this write up. It will be very helpful. If I am successful I will provide some updates. I can point out that with the UEFI firmware, once the 3 GB limit is disabled in the menu, I can copy RPI_EFI.fd (when the settings are stored) to the other RPi4 in the cluster and by pass having to attach a monitor to each device to make the change.
I stumbled upon this issue while looking to get the same PoE+ fan to work on CoreOS. I am using PXE booting, thus I cannot persist any changes in the UEFI BIOS. This required me to find a way to apply these 3GB limits and the device tree functionality on by default. The following are steps that I used:
- I used a fork of the pipxe project to add EFI flags into the build script of the UEFI image, see relevant change on my own fork. Building this project using the Makefile (
make -j4 will do) will produce the
RPI_EFI.fd file to the
pipxe/Build/RPi4/RELEASE_GCC5/FV folder with the 3GB RAM limit and device tree change applied by default.
- Using the files found from the “standard” RPi4 UEFI releases from Github, put all these files except for the
RPI_EFI.fd to your boot media (for PXE booting this means the
- Get all of the firmware overlays from Raspberry Github and add these into the
overlays folder alongside the
upstream-pi4.dtbo that you got from the step 2. When prompted to override the two files, do not override, instead keep the
upstream-pi4.dtbo you got from the UEFI project.
- To the
config.txt you got from the UEFI project, add a line which says
dtoverlay=rpi-poe depending on which version of the PoE hat you have.
- Boot the RPi. The UEFI should load and the defaults already be there. By the time you get into the login prompt, you should hear the fan pick up.
What I did not get to work was the WiFi module. Seemingly, the binary blobs required to get the WiFi to work in the CoreOS base image would require the firmware blobs to be placed into the OS image, but these seemingly cannot be loaded with device tree. Or this is what I assume is the case, as
nmcli fails to recognize the
wlan0 module as a WiFi interface. Using a privileged container (
sudo docker) allows to start an AP with e.g. on Alpine using
iw, but the AP cannot bridge the ethernet connection seemingly because the base OS fails to recognize the
wlan0 interface to be properly managed.
Nonetheless, I hope the instructions on the UEFI BIOS helps someone to get the PoE hats to work, or at least brings some transparency into the process already described by Dusty.
The current aarch65 fedora 36 kernels now enable the poe hat fan out of the box. There are some instructions on the raspberry pages in the fedora wiki.