Hi Andreas, Can you please try with this series from Simon? https://lore.kernel.org/u-boot/20241220003447.2913443-1-...@chromium.org/ It solved booting mainline kernel on CM4 for me (albeit not with FIT images).
Thanks, Chris On Tue, 8 Apr 2025 at 19:23, Andreas Enbacka <aenba...@gmail.com> wrote: > > Hello everyone, > > I am working on building a custom image targeting the raspberry pi cm4 > using Yocto / meta-raspberrypi (scarthgap release) and u-boot. > > The kernel and rootfs booted without issues before switching to using fit > image. I build the yocto image with kernel type / class set to fitImage. > For building u-boot I have specified e.g., CONFIG_FIT=y and similar > parameters. > > When booting the board, u-boot loads the fitImage (around 10MB in size) and > shows the kernel / device tree blob info (kernel is gzip compressed). > However, the process fails when u-boot executes "Uncompressing kernel..", > with Error: inflate() returned -3. This leads to a boot loop. > > I tried manually executing > 'load mmc 0:1 ${kernel_addr_r} fitImage; bootm > ${kernel_addr_r}#conf-bcm-2711-rpi-4-b.dtb', but it results in same error. > > The kernel_addr_r is set as 0x00080000. > > Any information about this would be greatly appreciated. > > Best regards, > Andreas Enbacka