Current directory structure: sys/ ${MACHINE}/ - MD stuff conf/ - MD kernel config files ${MACHINE/ - MD code include/ - MD includes ... - various MD modules such as binary compat boot/ - bootstrap ${MACHINE/ - MD boot code cam/ - cam subsystem coda/ - coda fs compile/ - compile work directory compat/ - MI binary compatibility conf/ - MI kernel config files contrib/ - 3rd party kernel code crypto/ - kernel crypto code ddb/ - DDB dev/ - several device drivers fs/ - one file system gnu/ - GNU kernel code i4b/ - ISDN support isa/ - MI ISA base code and a few drivers such as joy0 isofs/ - CD9660 fs kern/ - MI kernel code such as new-bus, vfs, init, etc. libkern/ - libc for the kernel miscfs/ - several fs's such as deadfs, devfs, etc. modules/ - skeleton for the modules msdosfs/ - MS-DOS FAT fs net/ - some network drivers such as ppp, slip, bpf, and generic network interface support netatalk/ - support for Appletalk network netatm/ - support for ATM network sockets netgraph/ - the spiffy netgraph system netinet/ - IPv4, TCP, UDP netinet6/ - IPv6, IPsec, TCP and UDP glue netipx/ - IPX/SPX netkey/ - undocumented key management protocol - RFC 2367 netnatm/ - native mode ATM netncp/ - Netware client protocol netns/ - Xerox NS, including IDP and SP nfs/ - NFS ntfs/ - NTFS nwfs/ - Netware FS pccard/ - old PC card drivers pci/ - MI PCI code and some drivers, notably PCI network cards posix4/ - random POSIX code bucket svr4/ - SVR4 binary compatibility sys/ - kernel includes ufs/ - UFS, FFS, and MFS vm/ - VM system Here is my proposal, adjusted a little as per suggestions. It attempts to follow these loose guidelines: - MD code under sys/${MACHINE}/ - device drivers (including bus's such as cam and usb) under sys/dev/ - file systems under fs/ - networking directory names start with "net" - kernel libraries under lib/ - binary compatibility modules under compat/ - 3rd party dirs such as gnu/ and contrib/ mirror top-level organization - other modules under sys/ directly (vm, ddb) sys/ ${MACHINE}/ - stay mostly the same, the directories under here mirror the sys/ directories. compat/ - MD code for the binary compatibility layers, would contain linux, svr4, etc. directories (done) boot/ - no change, the only place other than ${MACHINE} for MD code compat/ - MI binary compatibility code linux/ - parts of former sys/i386/linux (done) svr4/ - parts of former sys/svr4 (done) compile/ - move compiling under arch-specific dirs ${MACHINE}/ - formerly sys/compile conf/ - move NOTES to here from sys/i386/conf, but leave the rest of the dir the same for now contrib/ - stay the same. It mirrors the organization of sys/. For example, contrib'd device drivers under contrib/sys/dev, which is where they are now. crypto/ - no change ddb/ - no change dev/ - everything in there now plus some extras cam/ - formerly sys/cam isdn/ - formerly sys/i4b isa/ - formerly sys/isa, this just contains the support code for the ISA bus, actual device drivers such as joy0 would move into sys/dev/ pccard/ - new PC Card drivers (eventually) pci/ - formerly sys/pci, split up just as sys/isa fs/ - everything in there now plus some extras codafs/ - formerly sys/coda isofs/ - formerly sys/isofs msdosfs/ - formerly sys/msdosfs (done) nfs/ - formerly sys/nfs ntfs/ - formerly sys/ntfs nwfs/ - formerly sys/nwfs ufs/ - formerly sys/ufs/ufs ffs/ - formerly sys/ufs/ffs mfs/ - formerly sys/ufs/mfs deadfs/ - formerly sys/miscfs/deadfs devfs/ - formerly sys/miscfs/devfs (done) fdescfs/ - formerly sys/miscfs/fdesc (done) fifofs/ - formerly sys/miscfs/fifofs (done) kernfs/ - formerly sys/miscfs/kernfs (done) nullfs/ - formerly sys/miscfs/nullfs (done) portalfs/ - formerly sys/miscfs/portal (done) procfs/ - formerly sys/miscfs/procfs (done) specfs/ - formerly sys/miscfs/specfs (done) umapfs/ - formerly sys/miscfs/umapfs (done) unionfs/ - formerly sys/miscfs/union (done) gnu/ - No big change, but make it mirror sys/ as contrib does. As a result, sys/gnu/ext2fs -> sys/gnu/fs/ext2fs. kern/ - no change lib/ - place for internal kernel libraries libiconv/ - library needed for Netware FS stuff libkern/ - formerly sys/libkern modules/ - no change net*/ - no change pccard/ - old PC card drivers posix4/ - move the code to where it belongs.. i.e. scheduler stuff in kern, etc. If it is desirable to keep this split out such as gnu/ and contrib/ then treat it like gnu/ and contrib/. I'm not as firm about this one and am willing to just let it be if it isn't folded into the rest of the tree, however. sys/ - no change vm/ - no change Notes: - There have been a few votes for sys/bus instead of sys/dev for isa, eisa, pci, cam, usb, and friends. However, both NetBSD and OpenBSD have the busses under sys/dev, so that is probably where they should go. - According to Boris Popov, the nwfs move should be synched with the ncplib port, because otherwise it will not build correctly. Also, the port should probably be updated to check both places so it works in both environments. - OpenBSD has a sys/lib similar to the proposed one. - Ideally, sys/conf/NOTES will list all MI drivers and options, and sys/${MACHINE}/conf/NOTES will list MD drivers and options, and LINT will be built by cat'ing the two together and running them through makeLINT.pl. This file is available at http://people.FreeBSD.org/~jhb/docs/sysorg.txt