Re: how to learn kernel programming

Jim Dennis (jimd@starshine.org)
Sat, 11 Apr 1998 08:19:47 -0700


....
>>> much, I am more of a book learner.
>> Böhme et.al, Linux Kernel Programming, Addison Wesley 1998 (3rd(?) edition)
....

> Beware, however, that any book is going to be fairly out of date in a number
> of areas. Be prepared to refer to the source at frequent intervals.
> I usually tell people that their first port of call should be the source
> code, then myself, then this list.

What would it take to employ literate programming techniques
(CWEB?) to the Linux source tree?

I'm not a programmer, and I don't know LP or CWEB (and not
enough C or TeX to contribute substantially to Linux) --
but it seems like this would be a big win. If I understand it
correctly the idea of literate programming is to interlace
source code and documentation -- in such a way that the
binaries *and the user/programmer's manuals* can be built from
the same files.

Ideally we'd be able to have automated generation of
fully cross-indexed HTML sources. (So a new student of
the kernel could 'cd /usr/src/linux && make webtree' and
then use 'lynx file:///usr/src/linux/index.html' (or
somethine like that) to start traversing the tree.

> The books can be very useful if you are new to the style and layout of the
> Linux kernel, or of such low level code in general, but remember to take the
> precise definitions of structures etc. with a pinch of salt.
>
> As an aside, I tend to find that I learn virtually nothing from sitting down
> and reading source code. I do, however, learn a great deal by tracing source
> code in an attempt to examine a particular execution path in detail.
>
> I would recommend a newcomer to the scene to start, as you would with a new
> programming language, with a "hello world" program (or module, in this case),
> and work your way up. Think of something trivial which you want to change or
> implement, and you'll be amazed at how much you learn about the kernel
> structure when looking for particular pieces of code in it.
>
> Also, don't be afraid to ask for help - people on this list are almost
> always prepared to answer questions if you seem to have made a genuine
> attempt to find the answer. It's often quicker to get a response back
> from the list than it is to answer your own question.
>
> Happy Hacking.
> David Woodhouse,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu