Re: Porting Linux to a new architecture

David S. Miller (davem@caip.rutgers.edu)
Sun, 24 Mar 1996 12:07:20 -0500


Date: Sun, 24 Mar 1996 00:34:47 +0100 (MET)

- I suppose developers who have ported the Linux kernel to other
architectures before have been going through this stage, too. Is
there any help on this subject available, e.g. docs, or (easily-
understandable) source code that can serve as a model for porting?

(I already know about the kernel hacker's guide and where to find
ports to other architectures.)

The only way out of "this stage" is to sit and stare at the code for a
couple weeks. You are cheating yourself and will be in for a lot of
trouble if you rely on a documentation of the kernel itself to write
code to plug into it. This especially goes for new architecture
support, there are many interdependancies or weird quirks that you
just "have to experience" in the Linux kernel.

I'm biases as I'm against any attempt to document a moving target like
the Linux kernel.

- Is there any good reason not to start with linux-1.2.13?

Yep, many reasons. Many new and useful architecture dependant
interfaces and hooks are available in the latest kernels. Also,
starting with 1.2.13 will make it more difficult for maintainers of
major subsystems to help you out with your port, stay synced with
Linus's latest snapshots, this is how I did it and it saved me lots of
headaches.

- Any helpful hints or tricks?

Stare at the code for many hours and you won't need any ;-)

Later,
David S. Miller
davem@caip.rutgers.edu