1627
Comment: InitTask gets the old-wiki InitDetails merged into it
|
1273
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Kernel 0.0.1 Walkthrough. | Kernel 0.01 Walkthrough. |
Line 3: | Line 3: |
Downloading Kernel 0.01 and exploding the archive, you're faced with a directory "linux" containing, in subdirectories, some 5900 lines of (more or less) ANSI C, around 2500 lines of C headers (#include files) and around 1450 lines of i386 assembler. | After downloading Kernel 0.01 and unpacking the archive, you'll be facing a directory "linux" containing, in subdirectories, some 5900 lines of (more or less) ANSI C, around 2500 lines of C headers (#include files) and around 1450 lines of i386 assembler. |
Line 8: | Line 8: |
Line 10: | Line 10: |
||||boot||Kernel bootstrap code||BootDetails|| | ||||boot||Kernel bootstrap code||BootDetails|| |
Line 13: | Line 13: |
||||init||init process-the first process executed by a UNIX system||InitTask|| | ||||init||init process-the first process executed by a UNIX system||InitDetails|| |
Line 16: | Line 16: |
||||mm||Memory management||MmDetails|| | ||||mm||Memory management||MmDetails|| |
Line 18: | Line 18: |
Line 20: | Line 20: |
Line 22: | Line 22: |
The kernel bootup goes through three steps. * BootStrapFromPcBios * ThirtyTwoBitInitialization * InitTask |
Kernel 0.01 Walkthrough.
After downloading Kernel 0.01 and unpacking the archive, you'll be facing a directory "linux" containing, in subdirectories, some 5900 lines of (more or less) ANSI C, around 2500 lines of C headers (#include files) and around 1450 lines of i386 assembler.
The linux 0.01 kernel source is at http://www.kernel.org/pub/linux/kernel/Historic/
The code directories are as follows. Click on the Details column for more information.
Name |
Purpose |
Details |
|
boot |
Kernel bootstrap code |
||
fs |
File system |
||
include |
Header files |
||
init |
init process-the first process executed by a UNIX system |
||
kernel |
System calls |
||
lib |
Library code |
||
mm |
Memory management |
||
tools |
Program that splices three images together into a kernel image that can be booted from PC BIOS startup |
The header files are not the standard header files, because when you're working on a kernel you don't have the luxury of the usual C functions--you have to write your own versions.
The kernel directory contains most of the system functions, but some of them (like sys_fcntl()) are in the file system directory.