|
From: | Stuart Hughes |
Subject: | Re: [Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB |
Date: | Tue, 24 Nov 2009 18:13:09 +0000 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080707) |
Hi Franz,During kernel configuration if you press the '/' key and enter the symbol you're looking for (without the leading CONFIG_) it should show you the dependencies you need to enable to make it visible and select it.
Note: I don't think CONFIG_DEBUG_KERNEL turns on kernel debug messages, I think it's more about setting -g during the build to add symbols. I'm not sure and you may be better asking some kernel experts.
Regards, Stuart Franz Trierweiler wrote:
Stuart Hughes a écrit :Hi Franz,As far as ltib goes, you can do: ./ltib -p kernel -c and that will unpack the kernel sources and drop you to the kernel config screen. If the kernel config system has a configuration pooint to set KERN_DEBUG then you can set it there, save and exit and the kernel will build. If there is no config point for it, you'll have to edit the file manually.Regards, Stuart Franz Trierweiler wrote:Hello everybodyFreescale has just issued a new PDK (PDK 1.6) for the iMX25 3-stack evalboard. I have hardwired a SIM interface to my evalboard so that I can scope all electrical signals coming from that cell. The fact is that I am trying to debug the mxc_sim.c source file for this SIM interface. mxc_sim is a SIM driver. In order to achieve this, I would like to enable pr_debug (...) output to my console when this driver is running and watch all debug messages displayed.The kernel.h shows the pr_debug macro like this: /* If you are writing a driver, please use dev_dbg instead */ #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) #define pr_debug(fmt, ...) do { \ dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ } while (0) #elif defined(DEBUG) #define pr_debug(fmt, ...) \ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #else #define pr_debug(fmt, ...) \ ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) #endifThere seems that if I #define DEBUG somewhere then I will have the messages displayed (or logged) somewhere.Is there a way of doing this properly in the LTIB configuration when recompiling the kernel ?Or should I simply #define DEBUG in kernel.h? (This really does not sound the right way).Or should I simply put DEBUG=ON (or something like this) in the LTIB perl script? (sounds also very dirty).I really would like to make this in a clean way. Regards, FranzHi Stuart,There is no configuration point for KERN_DEBUG but I found a few references to DEBUG in ~/ltib/config/platform/imx/imx25_3stack_defconfig.dev# # Kernel hacking # # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 # CONFIG_MAGIC_SYSRQ is not set # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_MEMORY_INIT is not set CONFIG_FRAME_POINTER=y # CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_HAVE_FUNCTION_TRACER=yIt is recommended not to edit this file. Thus, I suspect there is a clean way of configuring CONFIG_DEBUG_KERNEL through LTIB. I invoked ltib with --configure and chose "Configure the kernel" (as usual) but never was successfull in finding the corresponding options. The --configure option makes changes in ~/ltib/config/platform/imx/imx25_3stack_defconfig.dev, thus I suspect I am not too far from what I am looking for.I will try to modify the file by hand. Regards, Franz
[Prev in Thread] | Current Thread | [Next in Thread] |