Is there a tool which can generate a small and simple source tree after config?

Mulyadi Santosa mulyadi.santosa at gmail.com
Mon Oct 24 22:15:28 EDT 2011


Hi :)

On Sun, Oct 23, 2011 at 23:29, jiangtao.jit <jiangtao.jit at gmail.com> wrote:
> Is there a tool which can generate a small and simple source tree after config?
> not pre-processor
> just generate a small source tree contains the files and dirs which really will be compiled
> and no macros like CONFIG_SMP etc.
> according to the configuration
>
> or some other way to understand the architecture of the final working source tree?

I feel the same way too, even 'til now :)

The way I do it is maybe counter intuitive for you. I compile the
kernel image with frame pointer enabled and debug info (check kernel
hacking section in "make config" during kernel compilation).

Then, together with a disk image, I run this kernel in Qemu virtual
machine. While running, I hook gdb to this Qemu instance. Finally, I
put breakpoints, watchpoints, check backtraces etc I needed to
understand the flow.

Maybe that'll work for you too.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list