ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB


From: Stuart Hughes
Subject: Re: [Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB
Date: Tue, 24 Nov 2009 08:42:36 +0000
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

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 everybody

Freescale 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; })
#endif

There 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,
Franz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]