-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
115 lines (96 loc) · 3.39 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Features (LAST UPDATED: 03/30/2013)
-------------------------------------------------------------------------------
kernel: arch/, boot/, kernel/, lib/
- binary loading (elf32)
- system calls:
* getpid
* fork
* yield
* exit
memory: arch/, mm/
- physical memory management (frame allocator)
- virtual memory (demand paging, mmap, copy-on-write)
- kernel dynamic memory (kmalloc)
- kernel dynamic mapping (kmap)
filesystem: fs/
- virtual filesystem
- initial ramdisk (flat, readonly, filesystem)
devices: dev/
- interrupt timer
- vga (console) driver
- pci device scanning/discovery
- serial port
development
- symbolic kernel backtraces
Build
-------------------------------------------------------------------------------
The kernel is built using gcc and binutils, and being compiled for the
i536 architecture. A good tutorial for building a cross compiler that
will build this kernel is on osdev: http://wiki.osdev.org/GCC_Cross-Compiler.
You will also need to install the GRUB utility programs and possibly xorisso.
Run
-------------------------------------------------------------------------------
I am using bochs to test and run the kernel. You can download bochs from the
bochs sourceforge page: https://sourceforge.net/projects/bochs/files/bochs/.
Make sure you compile bochs with the debugging enabled:
./configure \
--enable-pci \
--enable-vmx \
--enable-debugger \
--enable-disasm \
--enable-debugger-gui \
--enable-logging \
--enable-cdrom \
--enable-fpu \
--enable-x86-debugger \
--enable-iodebug \
--disable-plugins \
--disable-docbook \
--with-x --with-x11 --with-term
To run the kernel with qemu run:
$ ./qemu.sh
Thanks
-------------------------------------------------------------------------------
While I am writing the kernel and device code myself, there is some library
code that lives in the kernel that I did not write.
kernel/
arch/ ===
x86/ |
bcopy.S | 15-410 (OS course @ CMU)
bzero.S |
dev/ ===
pci/ |
pci_table.c | minix
inc/ ===
asm_style.h | 15-410
boot/ ===
multiboot.h | GNU (http://www.gnu.org/software/grub/manual/multiboot/)
===
errno.h | minix
lib/ ===
ctype.h |
fmt.h |
fmt/ |
doprnt.h |
doscan.h |
stdarg.h |
stddef.h |
stdint.h |
stdlib.h | University of Utah (CSL)
string.h | /
types.h | University of California (stdlib/qsort.c)
lib/ | /
stdlib/* | Carnegie Mellon (Mach)
string/* |
fmt/ |
doprnt.c |
doscan.c |
sprintf.c |
sscanf.c |
mm/ |
lmm/* |
malloc/* ===
All files retain their original copyright notices at the top. My many thanks
to the original developers for their work.
Also I'd like to thank everyone who contributed to the wiki at
http://wiki.osdev.org, as it is an invaluable resource.