Ticket #420 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

u-boot crashes when compiled with debugging enabled

Reported by: alphaone@… Owned by: laforge@…
Priority: high Milestone:
Component: u-boot Version: current svn head
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:


I just compiled uboot with debug output. If I attach the USB cable while u-boot
is running the phone shows weird lines of screen corruption.
See http://people.openmoko.org/alphaone/pics/uboot-corruption.jpg for a picture.

If I select the "Set console to serial" option before I attach the cable uboot
works fine. I can attach the USB cable and use dfu-util.

I then opened the console via USB and then switched the console back to USB. The
device then still locks up, but I can see some debug output before that:

In: usbtty
OIn: usbtty
OIn: usbtty

Change History

comment:1 Changed 12 years ago by laforge@…

  • Status changed from new to assigned

ok, this is caused by the switch from my own DEBUGP macros to the generic u-boot
"debug" macro.

However, the regular 'debug' macro ends up in a printf() call, which in turn can
call into the usb driver in case the console is set to usbtty.

So the solution is to introduce own, custom definitions for the 'debug' macro in
the USB code to always call serial_printf() instead of usual printf().

I'm currently testing a patch for this.

comment:2 Changed 12 years ago by laforge@…

  • Status changed from assigned to closed
  • Resolution set to fixed

fixed and tested in svn rev. 2041

Note: See TracTickets for help on using tickets.