Question

I am new to Android and to Kernel development, but I would like to test some things. I just finished compiling the first version of my modified kernel, and put it in a phone. Obviously, it doesn't work. How can I debug the kernel on the mobile phone?

I'm working over a Nexus 5 (MSM architecture, Linux 3.4.0 based). The .config used is the one by default (hammerhead_defconfig). When the kernel is booted, it only shows the Google screen, and stops there, forever.

I tried (with a working boot image) changing the 'console' parameter when generating the image with mkbootimg (tty, tty0, ttyHSL0), and I tried with different .config options as MSM_SERIAL_DEBUGGER (compilation error), FIQ_DEBUGGER (compilation error) and SERIAL_MSM (compiled, but no difference, no new devices in /dev on my computer). I tried with kgdb, following this, but I could not make the patches work for my architecture. Any idea?

Was it helpful?

Solution

I finally found a way to debug direcly over hardware:

http://blog.accuvant.com/jduckandryan/building-a-nexus-4-uart-debug-cable/ [Link down! Mirror at archive.org]

In Nexus 5 you need 3.3V instead of 3V of input, but it works like a charm.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top