Enabling debug prints to kernel log

Hello,

I am trying to debug a driver. The driver has calls to dev_dbg(...), but I am not seeing these messages in the kernel buffer when I execute dmesg.

Does anyone know how to change the default log level on boot so I can view the debug print statements?

Thanks

hello ck240,

the quickest way is enable dynamic debug flag,
for example,
if you’re going to enable dev_dbg() for imx274.c
# echo file imx274.c +p > /sys/kernel/debug/dynamic_debug/control

after that,
you’ll see debug logs enabled in dmesg.

Thanks for the tip.

I ended up adding loglevel=8 to the CMDLINE_ADD variable in p2771-0000.conf.common and reflashing the TX2 to guarantee that loglevel will be 8 at boot.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.