EHCI Gadget Debug: Difference between revisions

From coreboot
Jump to navigation Jump to search
(12 intermediate revisions by 2 users not shown)
Line 3: Line 3:


== Howto ==
== Howto ==
=== Patching ===
Download the [[:File:Ehci-debug-gadget-patches.tar.gz|patches]] that maintain TTY connected while debug target power-cycles or when host controller is reset.
Apply the patches from one of the v3.8- or v3.10-debug-gadget directories on your kernel build tree.
=== Compiling ===
* You need to be familiar with (cross) compiling your kernel.
* You need to be familiar with (cross) compiling your kernel.
* (Cross) compile it as usual but during the configuration do the following:
* (Cross) compile it as usual but during the configuration do the following:
Line 13: Line 19:
Then enable the following option:
Then enable the following option:
  <M>    EHCI Debug Device Gadget
  <M>    EHCI Debug Device Gadget
Then select the printk option for now(a bug has to be fixed to make serial option work properly):
Then select the serial option:
         EHCI Debug Device mode (printk)  --->
         EHCI Debug Device mode (serial)  --->
 
=== Loading ===
Remove all usb gadget drivers such as g_ether or g_mass_storage with rmmod then do:
modprobe g_dbgp
 
=== Running ===
I recommend to open the TTY before starting debug target. Doing it the other way
around slows down the debug target boot and seems to confuse serial gadget framework.
 
You may want to disable some CR/LF translations on the device:
stty -icrnl -inlcr -F /dev/ttyGS0
 
You can directly open the device node, possibly redirecting to file:
cat /dev/ttyGS0
.. or use a terminal client:
picocom -ir /dev/ttyGS0
 
=== Finding the USB debug port ===
See [[EHCI Debug Port#Finding the USB debug port]]


== Tested hardware ==
== Tested hardware ==
Line 24: Line 49:
|-
|-
! [http://projects.goldelico.com/p/gta04-main/ Goldelico GTA04 A3]
! [http://projects.goldelico.com/p/gta04-main/ Goldelico GTA04 A3]
| [https://github.com/goldelico/gta04-kernel/commits/neil-plus neil-plus kernel and branch]
| [https://github.com/goldelico/gta04-kernel/commits/neil-plus neil-plus kernel and branch (3.7)]
| Lenovo X60
| Lenovo X60
| {{yes}}
| {{yes}}
|-
|-
! Buglabs's bug 2.0
! [http://wiki.buglabs.net/index.php/Welcome_to_BUG_Wiki Buglabs's bug 2.0]
| TODO
| [https://github.com/buglabs/bug20-2.6.35-linaro/commits/master bug20-2.6.35-linaro's master (2.6.35) ]
| Lenovo X60
| Lenovo X60
| Not yet
| {{yes}}
|-
|-
|}
|}

Revision as of 23:47, 25 May 2014

Introduction

This page is about using embedded GNU/Linux devices in order to get the USB debug logs.

Howto

Patching

Download the patches that maintain TTY connected while debug target power-cycles or when host controller is reset.

Apply the patches from one of the v3.8- or v3.10-debug-gadget directories on your kernel build tree.

Compiling

  • You need to be familiar with (cross) compiling your kernel.
  • (Cross) compile it as usual but during the configuration do the following:

Go into Device Drivers:

Device Drivers  --->

Then go into USB support:

[*] USB support  --->

Then go into USB Gadget Support:

<M>   USB Gadget Support  --->

Then enable the following option:

<M>     EHCI Debug Device Gadget

Then select the serial option:

        EHCI Debug Device mode (serial)  --->

Loading

Remove all usb gadget drivers such as g_ether or g_mass_storage with rmmod then do:

modprobe g_dbgp

Running

I recommend to open the TTY before starting debug target. Doing it the other way around slows down the debug target boot and seems to confuse serial gadget framework.

You may want to disable some CR/LF translations on the device:

stty -icrnl -inlcr -F /dev/ttyGS0

You can directly open the device node, possibly redirecting to file:

cat /dev/ttyGS0

.. or use a terminal client:

picocom -ir /dev/ttyGS0

Finding the USB debug port

See EHCI Debug Port#Finding the USB debug port

Tested hardware

Brand and Device kernel used Target devices works?
Goldelico GTA04 A3 neil-plus kernel and branch (3.7) Lenovo X60 Yes
Buglabs's bug 2.0 bug20-2.6.35-linaro's master (2.6.35) Lenovo X60 Yes