Phase 1: Bootloader
Main Page
- Learn the Basics of Real Mode:
- Understand BIOS Interrupts (e.g.,
int 13h
for disk I/O, int 10h
for display).
- Study x86 assembly for 16-bit real mode.
- Write a Simple Bootloader:
- Write a program in assembly to display a message (e.g., “Hello, OS!”).
- Ensure it fits in a 512-byte boot sector.
- Compile using AS and link with GCC.
- Load a Kernel:
- Extend the bootloader to load a kernel from disk into memory.
- Use BIOS calls for disk reads.
- Transition to Protected Mode:
- Switch from real mode (16-bit) to protected mode (32-bit).
- Setup the Global Descriptor Table (GDT).
Phase 2: Kernel Basics
- Set Up the Kernel Environment:
- Write the kernel entry point in assembly.
- Switch to C for higher-level kernel development.
- Test printing messages from the kernel.
- Implement Basic Memory Management:
- Create a basic memory manager to allocate/deallocate memory.
- Implement a simple heap or stack
- Handle CPU Interrupts:
- Set up the Interrupt Vector Table (IVT).
- Write interrupt handlers for keyboard input and timer.
Phase 3: Device Drivers
- Keyboard Input:
- Write a driver to capture keyboard input.
- Display typed characters on the screen.
- Display Output:
- Mouse Support (Optional)
- Write a basic driver to read mouse input.
- Display mouse movements on the screen.
Phase 4: Userland and File System
- Develop a Simple CLI:
- Allow basic user commands (e.g., “help”, “reboot”).
- Handle I/O efficiently.
- File System:
- Implement a simple file system (e.g., FAT12/FAT16 or custom).
- Add support for reading files from disk.
Phase 5: Advanced Features
- Multi-tasking:
- Enhance the Kernel:
- Add support for modules (dynamically loadable components).
- Consider moving to a hybrid or microkernel architecture.
- Networking (Optional)
Phase 6: Refine and Expand
- Polish the OS:
- Optimize performance and memory usage.
- Refactor code for modularity.
- Experiment with 64-bit Mode:
- Transition into x86_64 for more features and modern architecture.
- Build Userland Applications:
- Develop small programs or utilities to showcase OS capabilities.