4

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.

The Linux distro was built with Yocto.

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

It seems that the boot process is stucked somewhere before loading the kernel into the RAM or at least before the logs are printed.

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 questions are :

  • How to have debug log during those 3 steps?
  • As there is no screen directly connected to the Pi,would it be possible to have these logs store in a regular file on the SD Card?
0

2 Answers 2

2

The debug messages you are asking about are on a stage where only the boot loader is running but not even the kernel is loaded. So there is no chance to have logging to a file because there is nothing what managed it. But you can enable the boot loader to output messages to the serial debug console. For this you need an USB to TTL (RS232) serial cable. An example for a debug output on a RPi 4B you can find at Serial output in case of no OS. I know you are using a RPi 3 so you cannot enable debug messages in the EEPROM because it hasn't one. But you can look at bootcode.bin UART enable (Pre Raspberry Pi 4B) how to enable debug messages from the boot loader.

2
1

on raspbian, you can access logs by typing dmesg, or dmesg>file to save the logs to a file, you can also look in /var/log, especially /var/log/syslog.

not sure if this will work on your os, hopefuly it does!

also, I think to get more logs on at startup you can install bootlogd with

apt-get install bootlogd

then look in /var/log

2
  • 2
    The question is more about debug logs before the kernel is actually loaded into the RAM.
    – user81908
    Commented Mar 7, 2018 at 8:37
  • I was wondering about that... Commented Mar 7, 2018 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.