Using OpenOCD JTAG in Android Kernel Debugging – Android Builder Summit 2012

Mike Anderson, CTO and Chief Scientist for The PTR Group, gives a tutorial about Linux kernel debugging in Android with OpenOCD JTAG at the Android Builder Summit in February 2012.

Abstract:

Owing to the use of the Linux kernel, Android device drivers can be debugged using many of the same techniques as Linux. Still, much of the user-space interface code typically found in Linux is missing in Android. This complicates the debugging of kernel driver code. This presentation will demonstrate the use of the open on-chip debug (OpenOCD) software and an inexpensive JTAG to debug Android kernel code. The target audience for this presentation are platform developers looking to debug their kernel code such as device drivers. This presentation is targeted at intermediate-level developers with some understanding of kernel code development.

You can also download the presentation slides on linuxfoundation.org website.

Support CNX Software - Donate via PayPal or become a Patron on Patreon
Advertisements
Subscribe
Notify of
guest
12 Comments
oldest
newest most voted
jose
8 years ago

Just a newbie question guys.
Not actually about openocd but something similar.
I’m running android from adeneo release 4.2 on iMX53qsb and im using ubuntu image from freescale on a windows 7 machine.
When i issue a gdbserver command on the target it always says ‘[1] segmentation fault’ even just a simple/plain ‘gdbserver’
I’m using the jtagkey2p from Amontec and jlink from Segger but gdbserver still spits the same error.
Any help would be appreciated guys, Thank you so much.

jose
8 years ago

@ cnxsoft
But I’m using a prebuilt image from Adeneo so i assumed they issue a properly compiled gdbserver?

jose
8 years ago

@ cnxsoft
Whoever you are, thank you so much for the link and for the advice.
But would it be enough if i use this in kernel hacking/debugging and device driver development?

By the way do you also have a tutorial link about the emulator you’re using?
I’ve been trying to use QEMU so i can start working while waiting for the hardware but i can’t make it to work i actually don’t know how to use it and what options i should give.

jose
8 years ago

Thank you again ‘cnxsoft’. Yah i just thought about that haha… I was thinking i can develop drivers using QEMU but it can’t simulate the GPIOs for the iMX platform right? Or is there a platform option that i can issue on QEMU so it can like simulate the platform’s pads or pins? Sorry I’m assuming too much, this whole thing is so alien to me. I haven’t used any full-blown devkit, I’ve only used PIC MCUs and a simulator to test the output with the IDE to debug. Could you advice me on what proper setup i should have… Read more »

jose
8 years ago

Thank you again cnxsoft, great help.
By the way best site for beginners like me.

jose
8 years ago

I’m trying OpenOCD-0.5.0 now and I have the jtagkey2p from Amontec. I did this: 1. $ ./configure –enable-ft2232_libftdi 2. make 3. make install 4. sudo openocd -f ./tcl/interface/jtagkey2p.cfg -f ./tcl/target/imx53.cfg 5. I get this error Error: The specified debug interface was not found (ft2232) The following debug interfaces are available: Runtime Error: ./tcl/interface/jtagkey2p.cfg:7: in procedure ‘script’ at file “embedded:startup.tcl”, line 58 in procedure ‘interface’ called at file “./tcl/interface/jtagkey2p.cfg”, line 7 Now this is the inside of jtagkey2p.cfg ——– jtagkey2p.cfg ————————– 1. # 2. # Amontec JTAGkey2P 3. # 4. # http://www.amontec.com/jtagkey2p.shtml 5. # 6 7. interface ft2232 8. ft2232_device_desc “Amontec… Read more »

trackback

[…] slides are not available, but you may want to have a look at the presentation slides for “Using OpenOCD JTAG in Android Kernel Debugging” by Mike Anderson, the PTR group. The video in the previous link at very bad audio […]

Advertisements