Source tree hierarchy

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Nov 30 09:16:10 PST 2004


On 2004-11-30 17:01, Jonathon McKitrick <jcm at FreeBSD-uk.eu.org> wrote:
> On Tue, Nov 30, 2004 at 06:54:35PM +0200, Giorgos Keramidas wrote:
> : On 2004-11-30 15:32, Jonathon McKitrick <jcm at FreeBSD-uk.eu.org> wrote:
> : > Why are there sometimes 2 levels of the same directory name, one beneath the
> : > other?
> : >
> : > Like sys and i386, for example?
> :
> : They are different things:
> :
> : /usr/src/sys		Kernel sources (entire source tree).
> :
> : /usr/src/sys/sys	Kernel header files.  These are installed as
> : 			/usr/include/sys/* by the installation process.
>
> Ok, that makes sense.  But src/sys/i386/i386 has source code, not just
> headers.  Is this code that is specific to i386 CPUs, while src/sys/i386 is
> just specific to the system architecture?

The /usr/src/sys/i386 directory is AFAIK an `architecture' directory,
like src/sys/sparc64 or src/sys/amd64.  The machine-dependent parts of
the i386 architecure are all under this tree.  Header files (include),
configuration options (conf), BIOS support (bios), or anything else
related to the i386 architecture is stored here.

The src/sys/i386/i386 directory is a `machine' related subdirectory.
The difference of architecture vs. machine becomes more apparent in
src/sys/amd64 where you find subdirectories like ia32 and amd64 :-)



More information about the freebsd-questions mailing list