jens-maus / RaspberryMatic

:house: A feature-rich but lightweight, buildroot-based Linux operating system alternative for your CloudFree CCU3/ELV-Charly 'homematicIP CCU' IoT smarthome central. Running as a pure virtual appliance (ProxmoxVE, Home Assistant, LXC, Docker/OCI, Kubernetes/K8s, etc.) on a dedicated embedded device (RaspberryPi, etc.) or generic x86/ARM hardware.
https://raspberrymatic.de
Apache License 2.0
1.53k stars 187 forks source link

Nightly: `Unexpected kernel BRK exception at EL1` with reference to `dwc_otg_hcd_init` #2780

Closed jens-maus closed 2 months ago

jens-maus commented 3 months ago

Describe the issue you are experiencing

After upgrading to the latest nightly snapshot version (3.77.2.20240618) for the RaspberryPi3, the bootup hangs in an endless loop after the last U-Boot Starting kernel... output.

After some investigation it seems the Linux kernel (6.6.31) runs into a Kernel panic mentioning Unexpected kernel BRK exception at EL1 and a pc pointing at dwc_otg_hcd_init. This can be seen by changing the content of /boot/cmdline.txt to console=tty1 loglevel=10. Then the following kernel panic pops up:

BFDEF11E-8DBE-4686-8774-DF790F1CF040_1_105_c

As a workaround to get the kernel booted again, the /boot/config.txt file can be changed and dtoverlay=dwc2 added so that the DWC2 USB controller support is used instead of the default dwc_otg one.

Describe the behavior you expected

The kernel should properly boot up.

Steps to reproduce the issue

  1. Download the latest 3.77.2.20240618 version for RaspberryPi3
  2. Flash image to fresh SD card
  3. Bootup system and note the endless loop ending up in U-Boot starting over and over again...
  4. Modify /boot/cmdline.txt and set console=tty1 loglevel=10 to see that the system now outputs the above mentiojned Kernel panic.
  5. Modify /boot/config.txt and add dtoverlay=dwc2 and note that now the kernel bootsup properly.

What is the version this bug report is based on?

3.77.2.20240618

Which base platform are you running?

rpi3 (RaspberryPi3, ARM64/aarch64)

Which HomeMatic/homematicIP radio module are you using?

RPI-RF-MOD

Anything in the logs that might be useful for us?

See screenshot above for kernel panic output.

Additional information

After some first investigation for the root cause it seems that with the introduction of the latest Buildroot 2024.05 the issue seem to have suddenly appeared. This seems to be related to the GCC v11 => GCC v13 upgrade which this buildroot version introduces. Downgrading GCC v13 to GCC v12 seem to recover/solve that issue point at some GCC related kernel compilation/setup issue.