rev |
line source |
nuclear@92
|
1 A minimal UNIX kernel project for x86 PCs
|
nuclear@92
|
2 -----------------------------------------
|
nuclear@1
|
3 Author: John Tsiombikas <nuclear@member.fsf.org>
|
nuclear@4
|
4
|
nuclear@4
|
5 License: GNU GPL v3 or any later version published by the free software
|
nuclear@4
|
6 foundation. See COPYING for details.
|
nuclear@4
|
7
|
nuclear@4
|
8 About
|
nuclear@4
|
9 -----
|
nuclear@92
|
10 When the editor of the Linux Inside magazine asked me to write for his newborn
|
nuclear@92
|
11 magazine, I leapt at the chance to start a series of introductory articles on
|
nuclear@92
|
12 kernel programming.
|
nuclear@92
|
13 For this reason I started writing a minimal, UNIX-like, operating system kernel
|
nuclear@92
|
14 from scratch. It's not complete yet, but it already has user/kernel protection
|
nuclear@92
|
15 levels, a virtual memory system with copy-on-write, processes, task switching,
|
nuclear@92
|
16 etc.
|
nuclear@92
|
17
|
nuclear@92
|
18 The articles themselves (only in Greek at the moment unfortunately) can be found
|
nuclear@92
|
19 at: http://nuclear.mutantstargoat.com/articles/kerneldev/index.html
|
nuclear@92
|
20
|
nuclear@4
|
21
|
nuclear@4
|
22 Compiling & Running
|
nuclear@4
|
23 -------------------
|
nuclear@4
|
24 To compile kernel image (kernel.elf) just type make (or gmake, if your default
|
nuclear@4
|
25 make tool is not GNU make). A script called "run" is supplied that will use qemu
|
nuclear@4
|
26 to run the kernel in a virtual machine.
|
nuclear@4
|
27
|
nuclear@4
|
28 If you wish to boot up the kernel on your computer you need a multiboot
|
nuclear@4
|
29 compliant boot loader like GRUB. Since you probably already have GRUB installed
|
nuclear@4
|
30 if you're running a GNU/Linux distribution, just add an entry to the GRUB config
|
nuclear@4
|
31 file (commonly /boot/grub/menu.lst) similar to this one and reboot:
|
nuclear@4
|
32
|
nuclear@4
|
33 title My kernel
|
nuclear@4
|
34 root (hdX,Y) # where X is the disk number and Y the partition (first being 0)
|
nuclear@4
|
35 kernel /path/to/kernel_code/kernel.elf # change this to the actual path
|
nuclear@4
|
36
|
nuclear@4
|
37 In case you are using GRUB 2 instead of the original GRUB, you'll have to
|
nuclear@4
|
38 consult the documentation on how to modify the above into the GRUB 2 syntax.
|
nuclear@4
|
39
|
nuclear@4
|
40 Disclaimer
|
nuclear@4
|
41 ----------
|
nuclear@4
|
42 All programs contain bugs, and this sample code will undoubtedly have its share.
|
nuclear@4
|
43 Running buggy kernel code on the real machine is very dangerous and may result
|
nuclear@4
|
44 in data loss or even damage to your computer in extreme cases. The author
|
nuclear@4
|
45 assumes no responsibility for any such eventuality. Run this code on your
|
nuclear@4
|
46 computer at your own risk.
|
nuclear@4
|
47
|
nuclear@4
|
48 Contact
|
nuclear@4
|
49 -------
|
nuclear@4
|
50 For any comments or suggestions regarding the articles or this supplemental
|
nuclear@4
|
51 code, please contact me at nuclear@member.fsf.org
|