Kernel Directory Structure
Posted: Tue Sep 04, 2012 4:22 am
Hi,
It has been about 9 months since I last came here. I am planning to reenter Os development in my spare time. Now after having ported newlib,gcc,nasm,binutils I am now thinking of restructuring my kernel sources, especially the directory structure. This may involve rewrite of much of the kernel code. So I was thinking about how to laydown my kernel directory structure. I have come up with a few design of my own but my mind is fresh and perhaps I may be overlooking something or some directory design decisions. So what do you think of it and what recommendations do you have.
It has been about 9 months since I last came here. I am planning to reenter Os development in my spare time. Now after having ported newlib,gcc,nasm,binutils I am now thinking of restructuring my kernel sources, especially the directory structure. This may involve rewrite of much of the kernel code. So I was thinking about how to laydown my kernel directory structure. I have come up with a few design of my own but my mind is fresh and perhaps I may be overlooking something or some directory design decisions. So what do you think of it and what recommendations do you have.
Code: Select all
Kernel directory structure
-------------------------------------
src
|
+---+ x86
|
+----+ docs
|
|
+----+ include
|
|
+----+ kernel libs
| |
| +------+ malloc
| |
| +------+ free
| |
| +------+ printf et al.
|
+----+ bootloader
| |
| +------+ USB fat32 bootloader
| |
| +------+ CDROM El-Torito bootloader
|
|
+----+ kernel
| |
| +------+ hardware specific functions
| | |
| | +------+ asm functions
| | |
| | +------+ c functions
| |
| +------+ hardware specific code functionality
| | |
| | +------+ GDT and IDT interface, interrupt and exception handling
| | |
| | +------+ paging management
| | |
| | +------+ pic and apic
| | |
| | +------+ process dispatcher and context switch management
| | |
| | +------+ multiprocessing
| | |
| | +------+ tss implementation
| | |
| | +------+ v86 implementation
| | |
| | +------+ PCI scanning
| |
| +------+ initialisation code
| |
| +------+ main kernel code
| |
| +------+ memory management interface
| |
| +------+ executable interface
| | |
| | +------+ elf loader
| | |
| | +------+ dll loading
| |
| +------+ module management
| |
| +------+ access control and permissions
| |
| +------+ network
| | |
| | +------+ TCP/IP UDP implementation
| | |
| | +------+ network management
| |
| +------+ resource management
| |
| +------+ scheduler
| | |
| | +------+ process
| | |
| | +------+ threads
| | |
| | +------+ multitasking
| |
| +------+ stdin stdout stderr interface
| |
| +------+ system calls
| |
| +------+ file interface
| |
| +------+ driver interface
| | |
| | +------+ native interface
| | |
| | +------+ EDI interface
| |
| +------+ inter process communication
| | |
| | +------+ pipes
| | |
| | +------+ sockets
| | |
| | +------+ signal
| | |
| | +------+ semaphores
| | |
| | +------+ mutex
| | |
| | +------+ shared memory
| |
+----+ drivers
| |
| +----+ device drivers
| | |
| | +------+ hard disk
| | | |
| | | +------+ ATA driver
| | | |
| | | +------+ SATA driver
| | | |
| | | +------+ SCSI driver
| | |
| | +------+ network driver
| | | |
| | | +------+ 8023 driver
| | |
| | +------+ usb driver
| | | |
| | | +------+ EHCI driver
| | | |
| | | +------+ OHCI driver
| | | |
| | | +------+ UHCI driver
| | |
| | +------+ mouse driver
| | |
| | +------+ keyboard driver
| |
| +----+ other drivers
| | |
| | +------+ filesystem driver
| | | |
| | | +------+ vfs driver
| | | |
| | | +------+ fat32 driver
| | | |
| | | +------+ ext2 driver
| | | |
| | | +------+ ntfs driver
| | |
| | +------+ screen driver
| | | |
| | | +------+ vga driver
| | | |
| | | +------+ console driver
| | | |
| | | +------+ vesa driver
| | |
| | |
| | |
| | |
| | |
^^^^^^^^^^^