I am currently trying to debug a "black screen" on a Raspberry Pi. The Pi is plugged to an in-house PCB using connector of the Pi and the LCD screen is connected on this in-house board.

Now, sometimes though not often, the boot process is stopped after a reboot command scheduled by the embedded application running on the plateform.

It seems that the boot process is stucked somewhere before loading the kernel into the RAM.

Now as far as i know there are 3 steps in the early boot phase of the PI :

  1. videocore
  2. bootcode.bin
  3. start.elf

My question is : how to have debug log during those 3 steps ? Moreover, there is no screen directly connected to the Pi so would it be possible to have these logs store in a regular file on the SD Card ?



You may want to take a look at kernel ring buffer stored in /proc/kmesg.

  • There is nothing in the kernel logs as when the problem occurs the kernel is not loaded.
    – user240177
    Mar 5 '18 at 16:13
  • Oh... What OS are you using?
    – corsel
    Mar 5 '18 at 16:18
  • An embedded linux distro built with Yocto, i have added the tag in the question.
    – user240177
    Mar 5 '18 at 16:20
  • I see... This is beyond me, I guess.
    – corsel
    Mar 5 '18 at 16:24

Connect RPi via serial port and log it on another PC.

Also you can try to increase kernel debug level with

echo 8 > /proc/sys/kernel/printk

If the problem occurs on lower level (before even serial driver is loaded) you can connect RPi via JTAG and debug it step by step remotely.

Though, most of such problems with RPi during boot happens because of slow SD card, bad SD card contact, power drop (power adapter is not powerful enough). So check your hardware first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy