Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix boottime kernel panic on RPi CM5 #1397

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gizahNL
Copy link

@gizahNL gizahNL commented Dec 23, 2024

Fixes #1394

This adds the required devicetree and overlays to the raspberrypi5.conf file to allow booting the RPi CM5 without a kernel panic.

Thanks @gokamura for finding the fix.

U-Boot still doesn't work in my testing, waiting to get the uart headers to see if there is some output there.

Copy link
Owner

@agherzan agherzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I had a small comment and I'd like to ask you to massage a bit the git log to adhere to https://meta-raspberrypi.readthedocs.io/en/latest/contributing.html (check git history for examples). Thanks!

conf/machine/raspberrypi5.conf Outdated Show resolved Hide resolved
@gizahNL gizahNL force-pushed the fix-rpi-cm5 branch 2 times, most recently from c5a6df1 to 4a47cd0 Compare December 23, 2024 12:32
Gijs Peskens added 2 commits December 23, 2024 13:37
Add new dtb's required for raspberry compute module 5

Signed-off-by: Gijs Peskens <gijs.peskens@munisense.com>
Compute module 5 depends on the bcm2712d0 overlay, and will
panic during boot without it.

Signed-off-by: Gijs Peskens <gijs.peskens@munisense.com>
@stu-spp
Copy link

stu-spp commented Jan 2, 2025

Bump! Can we get these changes merged in please?

@stu-spp
Copy link

stu-spp commented Jan 2, 2025

Wait, won't we also need to update the revision for rpi-bootfiles.bb? Will the current 20240319 have the device tree blobs we need?

Edit:

Oh, I guess it does, but I'm not sure how? Were the dtb files ready to go all the way back in March of 2024? How are these supposedly recently released device tree blobs available all the way back in March 2024? Aren't the blobs made available to the build via recipes-bsp/bootiles/rpi-bootfiles.bb?

x@xps:~$ sudo tree -ash /mntb/ | grep -E "cm5|stamp|2712"
├── [ 79K]  bcm2712-rpi-5-b.dtb
├── [ 80K]  bcm2712-rpi-cm5-cm4io.dtb
├── [ 80K]  bcm2712-rpi-cm5-cm5io.dtb
├── [ 80K]  bcm2712-rpi-cm5l-cm4io.dtb
├── [ 80K]  bcm2712-rpi-cm5l-cm5io.dtb
├── [612K]  kernel_2712.img
│   └── [1.5K]  bcm2712d0.dtbo
├── [   0]  rpi-bootfiles-20240319.stamp
x@xps:~$

@gizahNL
Copy link
Author

gizahNL commented Jan 2, 2025

For the Compute Module 5 (also the Rpi 5 and 4) the bootloader lives in an EEPROM chip, so no update would be needed, as those files aren't needed at all to boot.

EDIT:
The DTB files are created from the Linux Kernel sources (or at least I think they are)

@stu-spp
Copy link

stu-spp commented Jan 3, 2025

U-Boot still doesn't work in my testing, waiting to get the uart headers to see if there is some output there.

I'm trying to get bootdelay=-2 fed down into the build from a kas file. Is that possible? I've only managed to manually recompile u-boot with the correct CONFIG_BOOTDELAY=-2, but I'd rather have something in a kas file that does the configuration.

Is my only option doing a u-boot_%.bbappend in my custom meta layers and then trying to stuff in the extra configuration in a do_configure:append() ? Something like:

do_configure:append() {
    echo "CONFIG_BOOTDELAY=-2" >> ${B}/.config
}

That's annoying that I have to make a whole extra bbappend, and can't simply hit it from my kas file in some way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pi Compute Module 5, kernel panic.
3 participants