Jump to content

Debugging the kernel


Recommended Posts

Posted

Hi everybody,

I'm trying the do some modifications in the 2.6.29 kernel for the Desire. I already partially unlocked my phone using the unrevoked tool.

After having compiled my kernel, I can create a boot.ini file and flash it to the phone using adb when booting in recovery mode (ClockworkMod Recovery v2.5.0.7).

That works. My problem now is that I'm not able to debug the kernel I'm booting. Is there a way to get at least the printk messages or something else that could help me to debug my kernel ?

Thanks in advance

Jérôme

Guest frankoid
Posted (edited)
That works. My problem now is that I'm not able to debug the kernel I'm booting. Is there a way to get at least the printk messages or something else that could help me to debug my kernel ?

"adb shell dmesg" should let you see printk messaged as long as your kernel doesn't crash before adbd is started. I think you might need to install busybox on your phone to get dmesg. "adb shell cat /proc/last_kmsg" and "adb shell cat /proc/kmsg" may also be useful.

AnyKernel is useful when doing kernel development, it lets you make an update zip with your new kernel without having to unpack/repack boot.img

Edited by frankoid
Posted
"adb shell dmesg" should let you see printk messaged as long as your kernel doesn't crash before adbd is started. I think you might need to install busybox on your phone to get dmesg. "adb shell cat /proc/last_kmsg" and "adb shell cat /proc/kmsg" may also be useful.

AnyKernel is useful when doing kernel development, it lets you make an update zip with your new kernel without having to unpack/repack boot.img

Thanks for the link to AnyKernel. For the first part of your answer, my problem is that the adb does not work during the boot time because the server has still not been started on the device. What I want to debug is the early start of the kernel.

Guest frankoid
Posted
Thanks for the link to AnyKernel. For the first part of your answer, my problem is that the adb does not work during the boot time because the server has still not been started on the device. What I want to debug is the early start of the kernel.

Have you tried looking at /proc/last_kmsg the next time you boot (e.g. in recovery)?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.