Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 1995 22:44:59 +0100 (MET)
From:      Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
To:        hackers@freebsd.org
Subject:   kernel source tree structure
Message-ID:  <9511052144.AA24082@sirius.physik.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
hello 

(ideas part 1)

currently some people are working on ports of FreeBSD to other
architectures (for instance alpha and powerpc) - for that reason -
wouldn't it be good to think about the directory structure of the
kernel-source-tree - i think the NetBSD source tree gives some good
ideas to make it better for multiplatform-support and a cleaner
concept at all (that is only my idea - maybe you don't think so or i'm
totally wrong - but read on) - what are the differences:

* NetBSD has the architecture specific parts of the code behind the
dir's sys/arch/ARCHITECTURE (ARCHITECTURE may be i386 or alpha or
... - the same applies to all dirs which are arch-dependant like parts
of sys/libkern -> sys/libkern/arch/ARCHITECTURE or gnu/usr.bin/ld/rtld
-> gnu/usr.bin/ld/arch/ARCHITECTURE/rtld - and so on ...)
- this gives a clear separation between arch specific stuff and shared
stuff - how about using this in FreeBSD too ? - i think it's an easy
step (only some minor changes to the paths in some makefiles etc.) and
would make the source-tree much clearer (sorry for my bad english) -
one positiv point of this is that the compile dir (currently
sys/compile) would be _inside_ the arch-specific part
(sys/arch/ARCHITECTURE/compile) and you may compile and _keep_ kernels for
different arches from the same source-tree

---> all in all this would be:

  - now: sys/i386
         sys/compile
         sys/libkern

  - maybe: sys/arch/i386
           sys/arch/i386/compile
           sys/arch/alpha
           sys/arch/alpha/compile
           ...
       and sys/libkern/arch/i386
           sys/libkern/arch/alpha (the way it is done in NetBSD)
           ...
        or sys/libkern (maybe we can share something)
           sys/arch/i386/libkern
           sys/arch/alpha/libkern (another possible way)

* in NetBSD all sharable device-driver code is generalized and put
into the shared area - i think this would require more work than the
first step - but would make it a lot easier to port to other
architectures which are using for instance pci and scsi (in NetBSD
also scsi is separeted)

---> all in all this would be:

  - now: sys/i386/isa

  - maybe: sys/i386/isa (for arch specific stuff)
           sys/dev/isa 
           sys/dev/eisa
           sys/dev/pci (the way it is done in NetBSD) 
           sys/scsi
           ...
        or sys/isa (another possible way)
           sys/eisa
           sys/pci
           sys/scsi

* in NetBSD all "other-os-compatible-mode-code" is grouped together
all made after the same sheme - all in one dir is a good idea i think
because there are possible compat-options over multiple arches in the
future (for instance COMPAT_LINUX an an alpha)

---> all in all this would be:

  - now: sys/i386/ibcs2
         sys/i386/linux

  - maybe: sys/compat/ibcs2
           sys/compat/linux
           sys/compat/netbsd (maybe - NetBSD currently has freebsd :-)

that's all for now - just some ideas - please let me know what you
think about them

t
 _______________________________________________________||_____________________
                                                  __||
 Perfection is reached, not when there is no  __||       thomas graichen
 longer anything to add, but when there   __||      freie universitaet berlin
 is no longer anything to take away   __||              fachbereich physik
                                  __||
 - Antoine de Saint-Exupery - __||
 ___________________________||____email: graichen@omega.physik.fu-berlin.de____



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9511052144.AA24082>