-
Notifications
You must be signed in to change notification settings - Fork 418
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
Pi Compute Module 5, kernel panic. #1394
Comments
Are you testing with the cm5 plugged into the IO Board? It looks like the official Raspberry Pi OS images are shipping with:
I'll try to reproduce the panic you show, but while also using these extra sets of .dtb files. I guess the |
I'm not sure what's wrong. I can't even get console uart out on my builds. I tried to go with a newer kernel than your diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index 0b5909b..0aeb5d0 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -100,6 +100,7 @@ RPI_KERNEL_DEVICETREE ?= " \
broadcom/bcm2711-rpi-cm4.dtb \
broadcom/bcm2711-rpi-cm4s.dtb \
broadcom/bcm2712-rpi-5-b.dtb \
+ broadcom/bcm2712-rpi-cm5-cm5io.dtb \
"
KERNEL_DEVICETREE ??= " \
diff --git a/conf/machine/raspberrypi5.conf b/conf/machine/raspberrypi5.conf
index 03f15c3..c649ebf 100644
--- a/conf/machine/raspberrypi5.conf
+++ b/conf/machine/raspberrypi5.conf
@@ -15,6 +15,7 @@ MACHINE_EXTRA_RRECOMMENDS += "\
RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2712-rpi-5-b.dtb \
+ broadcom/bcm2712-rpi-cm5-cm5io.dtb \
"
SDIMG_KERNELIMAGE ?= "kernel_2712.img"
diff --git a/recipes-bsp/bootfiles/rpi-bootfiles.bb b/recipes-bsp/bootfiles/rpi-bootfiles.bb
index b04f24b..ffb9388 100644
--- a/recipes-bsp/bootfiles/rpi-bootfiles.bb
+++ b/recipes-bsp/bootfiles/rpi-bootfiles.bb
@@ -5,14 +5,14 @@ LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d
inherit deploy nopackages
-RPIFW_DATE ?= "20240319"
-SRCREV = "9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5"
+RPIFW_DATE ?= "20241210"
+SRCREV = "24247756bb3e962f0429b048cec5644e4a4253ab"
SHORTREV = "${@d.getVar("SRCREV", False).__str__()[:7]}"
-RPIFW_SRC_URI ?= "https://api.github.com/repos/raspberrypi/firmware/tarball/9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5;downloadfilename=raspberrypi-firmware-${SHORTREV}.tar.gz"
+RPIFW_SRC_URI ?= "https://api.github.com/repos/raspberrypi/firmware/tarball/${SRCREV};downloadfilename=raspberrypi-firmware-${SHORTREV}.tar.gz"
RPIFW_S ?= "${WORKDIR}/raspberrypi-firmware-${SHORTREV}"
SRC_URI = "${RPIFW_SRC_URI}"
-SRC_URI[sha256sum] = "4b436f8946b139c6a1202375ef55d4848e3bcd8c1a9cb47000e06d7ecec828f7"
+SRC_URI[sha256sum] = "50eceb608a3b3fa6b1f7cea7cd9618a7b910c5c3f541fb9e7c23eadcbdaee706"
PV = "${RPIFW_DATE}"
diff --git a/recipes-kernel/linux/linux-raspberrypi_6.6.bb b/recipes-kernel/linux/linux-raspberrypi_6.6.bb
index d12a78b..703c5ec 100644
--- a/recipes-kernel/linux/linux-raspberrypi_6.6.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_6.6.bb
@@ -1,8 +1,8 @@
-LINUX_VERSION ?= "6.6.36"
+LINUX_VERSION ?= "6.6.64"
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"
-SRCREV_machine = "769634f344626ed73bcda14c91b567067974d7b2"
+SRCREV_machine = "80533a952218696c0ef1b346bab50dc401e6b74c"
SRCREV_meta = "733366844f5e114221372929392bf237fc8d823c"
KMETA = "kernel-meta" config.txt: x@xps:~/workspace/code/usbboot$ cat /mntc/config.txt | grep uart
#init_uart_baud=115200
#init_uart_clock=3000000
#dtparam=uart0=on
enable_uart=1
dtparam=uart0=on
dtoverlay=uart0
dtparam=uart0_console
x@xps:~/workspace/code/usbboot$ cmdline.txt: x@xps:~/workspace/code/usbboot$ cat /mntc/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait net.ifnames=0 earlycon=pl011,0x1c00030000,115200n8
x@xps:~/workspace/code/usbboot$ Binwalk of the kernel shows
Bootfiles on eMMC: x@xps:~/workspace/code/usbboot$ sudo ls -laht /mntc/
total 46M
-rwxr-xr-x 1 root root 79K Dec 14 23:08 bcm2712-rpi-cm5-cm4io.dtb
-rwxr-xr-x 1 root root 79K Dec 14 23:08 bcm2712-rpi-cm5-cm5io.dtb
-rwxr-xr-x 1 root root 79K Dec 14 23:08 bcm2712-rpi-cm5l-cm4io.dtb
-rwxr-xr-x 1 root root 79K Dec 14 23:08 bcm2712-rpi-cm5l-cm5io.dtb
-rwxr-xr-x 1 root root 141 Dec 14 23:02 cmdline.txt
-rwxr-xr-x 1 root root 2.6K Dec 14 23:00 config.txt
drwxr-xr-x 22 root root 4.0K Dec 14 19:57 ..
-rwxr-xr-x 1 root root 52K Apr 5 2011 bootcode.bin
-rwxr-xr-x 1 root root 3.2K Apr 5 2011 fixup4cd.dat
-rwxr-xr-x 1 root root 5.4K Apr 5 2011 fixup4.dat
-rwxr-xr-x 1 root root 8.3K Apr 5 2011 fixup4db.dat
-rwxr-xr-x 1 root root 8.3K Apr 5 2011 fixup4x.dat
-rwxr-xr-x 1 root root 3.2K Apr 5 2011 fixup_cd.dat
-rwxr-xr-x 1 root root 7.2K Apr 5 2011 fixup.dat
-rwxr-xr-x 1 root root 11K Apr 5 2011 fixup_db.dat
-rwxr-xr-x 1 root root 11K Apr 5 2011 fixup_x.dat
-rwxr-xr-x 1 root root 25M Apr 5 2011 kernel_2712.img
drwxr-xr-x 2 root root 8.0K Apr 5 2011 overlays
-rwxr-xr-x 1 root root 0 Apr 5 2011 rpi-bootfiles-20241210.stamp
-rwxr-xr-x 1 root root 794K Apr 5 2011 start4cd.elf
-rwxr-xr-x 1 root root 3.6M Apr 5 2011 start4db.elf
-rwxr-xr-x 1 root root 2.2M Apr 5 2011 start4.elf
-rwxr-xr-x 1 root root 2.9M Apr 5 2011 start4x.elf
-rwxr-xr-x 1 root root 794K Apr 5 2011 start_cd.elf
-rwxr-xr-x 1 root root 4.7M Apr 5 2011 start_db.elf
-rwxr-xr-x 1 root root 2.9M Apr 5 2011 start.elf
-rwxr-xr-x 1 root root 3.6M Apr 5 2011 start_x.elf
drwxr-xr-x 3 root root 16K Dec 31 1969 .
x@xps:~/workspace/code/usbboot$ |
Yes
I'm working with one of the "fat ones", tbh not sure on the capacity :/
To get earlycon uart out on the GPIO you need to add After creating this issue I've also tried with an image created with buildroot, yielding the same results. |
I saw a similar kernel panic like After adding |
@gokamura that indeed did fix it for me! It's booting now. |
Yes, I think that was my problem as well (adding bcm2712d0.dtb0 to the overlays). Not sure why I couldn't get UART console on boot earlier. My config.txt is pretty messy/nonsensical. For posterity: root@raspberrypi5:~# dmesg | head
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[ 0.000000] Linux version 6.6.64-v8-16k (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 14.2.0, GNU ld (GNU Binutils) 2.43.1) #1 SMP PREEMPT Thu Dec 12 19:45:21 UTC 2024
[ 0.000000] KASLR enabled
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi Compute Module 5 Rev 1.0
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000002000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000002000000..0x0000000005ffffff (65536 KiB) map reusable linux,cma
[ 0.000000] OF: reserved mem: 0x0000000000000000..0x000000000007ffff (512 KiB) nomap non-reusable atf@0
root@raspberrypi5:~#
root@raspberrypi5:~# ls -laht /boot/overlays/
total 24K
drwxr-xr-x 2 root root 4.0K Apr 5 2011 .
-rwxr-xr-x 1 root root 1.5K Apr 5 2011 bcm2712d0.dtbo
drwxr-xr-x 3 root root 16.0K Jan 1 1970 ..
root@raspberrypi5:~# uname -a
Linux raspberrypi5 6.6.64-v8-16k #1 SMP PREEMPT Thu Dec 12 19:45:21 UTC 2024 aarch64 GNU/Linux
root@raspberrypi5:~# ls -laht /boot/
total 46M
drwxr-xr-x 18 root root 4.0K Dec 20 19:06 ..
-rwxr-xr-x 1 root root 104 Dec 20 19:05 cmdline.txt
-rwxr-xr-x 1 root root 79.3K Apr 5 2011 bcm2712-rpi-5-b.dtb
-rwxr-xr-x 1 root root 79.6K Apr 5 2011 bcm2712-rpi-cm5-cm4io.dtb
-rwxr-xr-x 1 root root 79.7K Apr 5 2011 bcm2712-rpi-cm5-cm5io.dtb
-rwxr-xr-x 1 root root 51.2K Apr 5 2011 bootcode.bin
-rwxr-xr-x 1 root root 2.7K Apr 5 2011 config.txt
-rwxr-xr-x 1 root root 7.2K Apr 5 2011 fixup.dat
-rwxr-xr-x 1 root root 5.3K Apr 5 2011 fixup4.dat
-rwxr-xr-x 1 root root 3.2K Apr 5 2011 fixup4cd.dat
-rwxr-xr-x 1 root root 8.3K Apr 5 2011 fixup4db.dat
-rwxr-xr-x 1 root root 8.3K Apr 5 2011 fixup4x.dat
-rwxr-xr-x 1 root root 3.2K Apr 5 2011 fixup_cd.dat
-rwxr-xr-x 1 root root 10.1K Apr 5 2011 fixup_db.dat
-rwxr-xr-x 1 root root 10.1K Apr 5 2011 fixup_x.dat
-rwxr-xr-x 1 root root 24.1M Apr 5 2011 kernel_2712.img
drwxr-xr-x 2 root root 4.0K Apr 5 2011 overlays
-rwxr-xr-x 1 root root 0 Apr 5 2011 rpi-bootfiles-20241210.stamp
-rwxr-xr-x 1 root root 2.8M Apr 5 2011 start.elf
-rwxr-xr-x 1 root root 2.2M Apr 5 2011 start4.elf
-rwxr-xr-x 1 root root 793.7K Apr 5 2011 start4cd.elf
-rwxr-xr-x 1 root root 3.6M Apr 5 2011 start4db.elf
-rwxr-xr-x 1 root root 2.9M Apr 5 2011 start4x.elf
-rwxr-xr-x 1 root root 793.7K Apr 5 2011 start_cd.elf
-rwxr-xr-x 1 root root 4.6M Apr 5 2011 start_db.elf
-rwxr-xr-x 1 root root 3.6M Apr 5 2011 start_x.elf
drwxr-xr-x 3 root root 16.0K Jan 1 1970 .
root@raspberrypi5:~# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait net.ifnames=0
root@raspberrypi5:~# cat /boot/config.txt | tail
dtparam=i2c_arm=on
dtparam=i2c_vc=on
dtoverlay=uart0
dtoverlay=uart0_console
dtparam=uart0=on
enable_rp1_uart=1
pciex4_reset=0
dtoverlay=disable-bt
dtoverlay=dwc2,dr_mode=host
root@raspberrypi5:~# cat /etc/os-release
ID=poky
NAME="Poky (Yocto Project Reference Distro)"
VERSION="5.1.1 (styhead)"
VERSION_ID=5.1.1
VERSION_CODENAME="styhead"
PRETTY_NAME="Poky (Yocto Project Reference Distro) 5.1.1 (styhead)"
CPE_NAME="cpe:/o:openembedded:poky:5.1.1"
root@raspberrypi5:~# |
Description
The kernel panics on a CM5
Steps to reproduce the issue:
config.txt:
cmdline.txt:
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait net.ifnames=0 console=ttyAMA0,115200 earlycon=pl011,0x1c00030000,115200n8
(not sure if ttyAMA0 is correct, it panics regardless of that being set)3. Boot and observe the kernel panic.
Additional details (revisions used, host distro, etc.):
I've tried adding the CM5 overlays to the raspberry5.conf & include, however this doesn't fix the panic:
Full boot log:
The text was updated successfully, but these errors were encountered: