mtk android lcm 打印log信息方法

在kernel\lcm\***.c 文件中加入以下语句,再通过print打印信息。


#ifdef BUILD_UBOOT

#include
#define print(x...) printf(x)
#else
#include
#define print(x...) printk(x)

#endif


PS:先开机,再插入USB。


GetKernel Log from Android
–We can use tool to pull the log from Kernel buffer

adb shell dmesg > dmesg.txt
It get now the bufferdata.

adb shell cat proc/kmsg >  kmsg.txt
It continued cat thebuffer data.

–Warning: when kernel panic or platform hang, it may beinvalid.

你可能感兴趣的:(理论篇,linux驱动)