Chapter 16. Physical Layout of the Kernel Source
So far, we’ve talked about the Linux kernel from the perspective of writing device drivers. Once you begin playing with the kernel, however, you may find that you want to “understand it all.” In fact, you may find yourself passing whole days navigating through the source code and grepping your way through the source tree to uncover the relationships among the different parts of the kernel.
This kind of “heavy grepping” is one of the tasks your authors perform quite often, and it is an efficient way to retrieve information from the source code. Nowadays you can even exploit Internet resources to understand the kernel source tree; some of them are listed in the preface. But despite Internet resources, wise use of grep,[62] less, and possibly ctags or etags can still be the best way to extract information from the kernel sources.
In our opinion, acquiring a bit of a knowledge base before sitting
down in front of your preferred shell prompt can be
helpful. Therefore, this chapter presents a quick overview of the
Linux kernel source files based on version 2.4.2. If you’re interested
in other versions, some of the descriptions may not apply
literally. Whole sections may be missing (like the
drivers/media directory that was introduced in
2.4.0-test6 by moving various preexisting drivers to this new
directory). We hope the following information is useful, even if not
authoritative, for browsing other versions of the kernel.
Every pathname ...