如何打开linux内核中dev_dbg的开关 比如要打开某个驱动中的dev_dbg,那么需要在驱动文件.c中这些行"<linux/device.h>"或者"<linux /platfom_device.h>"(device.h包含platform_device.h)之前定义DEBUG 如:drivers/mtd/spi-nor/spi-nor.c 第一步: #include <linux/module.h> #define DEBUG 1新增的内容,最...
第二步(这一步笔者认为可选): 在make menuconfig配置CONFIG_CONSOLE_LOGLEVEL_DEFAULT这个选项的值为8 Location: -> Kernel hacking -> printk and dmesg options 注意内核版本为4.14