Boot stopping after four berries

After building the yocto project with bitbake core-image-full-cmdline I get no errors during build, but the boot stops after showing a logo with 4 rpi berries. I have done no changes to the repo

It works with bitbake core-image-base

Hi @davidlekve,

So I understand correctly:

  • its the Raspberry Pi 5
  • you intend to use keyboard+monitor to log in, not the serial terminal

My guess is that the core-image-minimal and core-image-full-cmdline images just have the serial tty open on startup, whereas the core-image-base also has a graphical login.

Greetz,
Josef

Hi and thank you for your help @TheYoctoJester . It is much appreciated.

It is a raspberry pi 5 and yes I intend to use keyboard+monitor.

I am trying to make sure that tty options are correct, but I cannot find any differences in the configuration of console, SERIAL_CONSOLES.

I have a fan connected to the raspberrypi5. When I use the core-image-base it turns on max during build, but then goes quit after 5 seconds and prompts for login and password. This does not happen with the core-image-full-cmdline as the fan stays on max. I would guess this is an indication that there is something wrong during boot and that it never prompts for login, no matter the tty(?)

The same problem has occured when installing packages. I installed networkmanager and the boot failed, only showing 4 berries. This was fixed by installing nmcli together with networkmanager.

@davidlekve

Do you have a Raspi Debug thingy so you can access the serial port? That might be helpful to see what is actually going on.

Alternatively, if you’re lucky, then only the GUI is stuck but the rest works, so you might be able to SSH into it. You can add an SSH server to the image by dropping this into local.conf:

EXTRA_IMAGE_FEATURES:append = " ssh-server-dropbear "

Greetz,
Josef

I do not have it now, but will try to attain one.

I will also try the ssh.

Could it have anything to do with machine_extra_rdepends or machine_extra_rrecommends? Because “This variable affects all images based on packagegroup-base, which does not include the core-image-minimal or core-image-full-cmdline images.”

Hi @TheYoctoJester

I added console=tty1 to the cmdline.txt by adding
CMDLINE_SERIAL="console=serial0,115200 console=tty1"
to conf/local.conf

I then got logs on the hdmi output that shows this:

I also connected the rpi through the serial port and used tio (terminal IO) for reading. The only output I got was:

[tio 21:06:05] tio v1.32
[tio 21:06:05] Press ctrl-t q to quit
[tio 21:06:05] Connected

raspberrypi5 login:

but it was twitching a lot and saying that root is an incorrect login.

I asked chatgpt why my boot was failing with the last logline and got:

Why does my yocto boot stop on this line:

vc4-drm axi:gpu: bcm2712_iommu_of_xlate: MMU 1000005200.iommu

ChatGPT said:
ChatGPT

The issue you’re encountering, where the Yocto boot process stops on the line:

vc4-drm axi:gpu: bcm2712_iommu_of_xlate: MMU 1000005200.iommu

suggests that the boot process is halting during the initialization of the VC4 (VideoCore 4) Direct Rendering Manager (DRM) driver, which is responsible for the GPU on the Raspberry Pi (in this case, the BCM2712 used in the Raspberry Pi 5). Specifically, it looks like there is an issue with translating the IOMMU (Input-Output Memory Management Unit) for the GPU.

Here are some possible causes and steps you can take to debug the issue:

Kernel Configuration: Ensure that the kernel configuration for the Raspberry Pi 5 (BCM2712) is correct. Some issues might arise if the kernel isn't properly set up to handle the IOMMU or GPU. Double-check that your Yocto build includes the necessary drivers for the Raspberry Pi 5, including the vc4 DRM driver and IOMMU support.

Device Tree (DTB) Issues: The issue could be related to the Device Tree file (.dtb). If the Device Tree does not correctly describe the IOMMU or GPU resources for the BCM2712, the system might hang. Verify that you're using the correct Device Tree for the Raspberry Pi 5 in your Yocto configuration.

Missing Firmware: The Raspberry Pi GPU requires firmware to initialize properly. Make sure the necessary firmware files for the Raspberry Pi 5 GPU are included in the root filesystem or boot partition. The absence of these files could cause the GPU initialization to fail.

Check Kernel Logs: If possible, enable more verbose kernel logging to get additional details on where the boot process is failing. You can increase the verbosity by appending loglevel=8 to the kernel boot parameters. This might provide more insight into the issue.

Compatibility Issues with MMU/IOMMU: The BCM2712 uses an IOMMU for memory management with the GPU. If the IOMMU settings are incorrect or the MMU driver has issues, this could prevent the system from proceeding. Check if there are any known issues or patches related to the BCM2712 IOMMU driver.

Check for Patches or Updates: Since the Raspberry Pi 5 (BCM2712) is relatively new, ensure you're using the latest upstream Yocto layers, BSP (Board Support Package) components, and kernel patches. There could be ongoing work or recent updates to improve support for the Raspberry Pi 5 hardware, including GPU and IOMMU functionality.

Debugging the specific IOMMU initialization error might also involve looking into the bcm2712_iommu_of_xlate function, which translates the IOMMU bindings in the Device Tree

I found this issue and its solution resolved the issue for me

Hi @davidlekve,

Thanks for sharing - just to fully understand this (and so others can find the solution here) - you added something like

IMAGE_INSTALL:append = " kernel-module-i2c-brcmstb "

Or something else?

Greetz,
Josef

1 Like

What has worked for me (until now) is removing dtoverlay=vc4-kms-v3d from config.txt. I have not tested the other solutions presented in the post yet.