2018-11-08 03:58:41 +00:00
|
|
|
# x86 Bootstrap
|
2018-11-08 03:58:18 +00:00
|
|
|
2-stage FAT12 bootstrap code for x86
|
2018-11-08 03:41:59 +00:00
|
|
|
|
2018-11-08 03:47:11 +00:00
|
|
|
### Summary
|
2018-11-08 03:46:36 +00:00
|
|
|
Stage 1 loader loads stage 2 loader from the floppy and jumps to it.
|
|
|
|
|
|
|
|
Stage 2 loader initializes protected mode, detects system memory, loads the kernel from the floppy, and eventually calls "kmain" function in kernel.c.
|
|
|
|
|
2018-11-08 03:47:59 +00:00
|
|
|
Yes the ASM code and the makefile could use some refactoring.
|
|
|
|
|
2018-11-08 03:47:11 +00:00
|
|
|
### Building
|
2018-11-08 03:51:03 +00:00
|
|
|
Run "make".
|
2018-11-08 03:41:59 +00:00
|
|
|
|
|
|
|
The boot image "boot.img" is generated under "out" directory.
|
|
|
|
|
|
|
|
Use QEMU or Bochs to emulate.
|