AnswerBun.com

How to Debug Bootloader (u-boot) and linux kernel in Raspberry PI

Raspberry Pi Asked by Abdul Rahuman Seeni Mohamed on January 4, 2022

I’m learning bootloader (u-boot) and want to perform live debug u-boot with raspberry PI.
My doubt is, is it possible to debug bootloader in raspberry pi?. If yes, how can i do setup to perform live debug.

I have u-boot code and compiled it and also imported in eclipse IDE. I want to know steps to do flashing the u-boot.bin into raspberry pi / SD card and then debugging with eclipse + GDB.

One Answer

Debugging a running Linux kernel is possible. You will need a J-Link debug probe and you will have to enable JTAG functions on your GPIO pins. It is recommended to use an RPi 1 for this, for which there is a nice tutorial. I suppose it's possible to do the same on RPi 3, since the RPi foundation claims the SoC architecture is mostly identical, but you're on your own here (tl;dr: Broadcom BCM2837 datasheet is not available).

Note that this requires to set a non-default mode for GPIO pins, so it won't work in early boot stages. If you need to debug the bootloader or the early kernel booting steps, you'll have to use an emulator.

Answered by Dmitry Grigoryev on January 4, 2022

Add your own answers!

Related Questions

Apt: apt update command fails to update

2  Asked on November 5, 2021 by shiddiqi

       

How to clean up my /boot partition?

3  Asked on November 5, 2021

   

Do i need a fan, or will ventilation holes suffice?

1  Asked on October 5, 2021 by user121626

   

Raspberry Pi Zero SSH issues

1  Asked on October 5, 2021 by user122249

   

REINSTALL THE NOOBS to another OS

1  Asked on October 5, 2021 by nam-nguyn-hi

 

Setting USB current limit on Raspberry Pi 4

1  Asked on October 5, 2021 by kkx07805

   

tightvncserver and autocutsel not starting via xstartup

0  Asked on October 5, 2021 by asylumax

 

What is the default cmdline.txt for Raspberry Pi 4

1  Asked on October 5, 2021 by mike-c

   

HDMI port won’t work on Raspberry Pi

2  Asked on October 5, 2021 by yankue-team

 

IP address missing from router DCHP table

5  Asked on October 5, 2021 by tim-gilchrist

 

popen() vs netcat

1  Asked on October 5, 2021 by weirdgyn

   

RPI-Clone an SSD to an SSD – Fails with I/O Error

0  Asked on October 5, 2021 by hackxit

   

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP