I’m trying to build my own kernel for use with Fedora IoT Edition on a Raspberry Pi CM3 and CM4. I’ve tried to build a kernel from 5.10 sources, patched it to 5.10.74 and applied patches from raspberry pi foundation. I’m using the “fedberry” kernel as a starting point. I’m successfully able to build the kernel either with only the raspberry pi configuration or with an additional “fedora” set of configs the people behind the fedberry kernel already figured out. Mostly stuff around SELinux as it seems.
The problem is with both “stock” Raspberry Pi configs and fedberry configs (I now that the former won’t successfully boot or work due to at least SELinux problems) that both error at boot because they don’t seem to find the on-board eMMC storage chip with the OS on it on the Compute Modules. This happens with both my self-build fedberry kernel as well as with the RPMs from copr.
From what I get the fedberry kernel is successfully used on Workstation and Server Editions on standard Raspberry Pis with SD storage. Some comments and configs indicate that someone already tried (and succeeded?) in booting Fedora IoT on the standard pis. What in my case does not seem to work is Fedora IoT with this kernel on Compute Modules.
The Fedora IoT kernel of course works. In an Fedora IoT ostree-based system the only thing that changes between the OS state with the fedora kernel and my custom kernel are the kernel image, the kernel dtb files and it’s modules. The whole boot partition is untouched by this process except for a boot loader configuration of uboot and grub.
The boot logic in Fedora IoT is different from what is done in Raspberry Pi OS and I suspect a configuration is missing or wrong for the kernel to work with this custom way of booting. I suspect that somehow the wrong dtb file is used such that it does not have the necessary drivers to load the eMMC. I looked through the configuration and at least the SDHCI and MMC related drivers are there. I’m puzzled how the dtbs are actually loaded at boot.