This is a very simple x86_64 OS I am creating for learning purposes.
- Simple UEFI Bootloader (to be replaced by GRUB in the future?)
- Physical and Virtual memory management
- Terminal that can print 32-Bit colored text and receive keyboard input
- Interrupt handling
- APIC Timer support
- IOAPIC support
- User mode processes
- Kernel Threads
- Multitasking & Multithreading
- System calls via syscall instruction
- Linux-like virtual file system (with mount support)
- file system permissions with read, write, execute and setuid permissions
- FileSystem driver API
- Character- and BlockDevice driver API
- Multi-Core support
- Usermode SSE & FPU support
- Basic shell that can run programs with command line arguments
- Basic ACPI support using ACPICA (currently only shutdown supported)
- Basic readonly Ext2 driver (used for ramdisk)
- Usermode C++ library for basic interaction with the Kernel (Function definitions for all important syscalls)
- HDD support (SATA)
- USB support (madness)
- IP Stack
- Full C library support
This OS should basically run on any x86_64 machine that supports UEFI. If you find a machine that does not work with SimpleOS2, please contact me.
- Some kind of Linux environment (or WSL)
- Standard 64-Bit Elf GCC
- Standard 64-Bit mingw GCC
- NASM
- mtools
- debugfs
- parted
make depcheck
: check if all dependencies are installedmake partition
: build a raw partition image that contains the OSmake disk
: build a raw disk image that contains the OSmake diskvbox
: build a virtualbox disk image (.vdi) that contains the OSmake clean
: remove everything but the sources
make runkvm
: run the OS in qemu (requires qemu-system-i86_64)make runvbox
: run the OS in VirtualBox (Requires a VirtualBox machine with name 'SimpleOS2' and partition.vdi as hard disk, chipset has to be ICH9)make debug
: run the OS in qemu and debug it in GDB
- every command above can be followed by
config=Release
orconfig=ReleaseDbg
to use/build a Release configuration of the OS
I have run SimpleOS2 on my own hardware several times and never encountered any damage. Nevertheless, I do not take any responsibility for any kind of damage to your system! Since SimpleOS2 has no disk writing functionality yet, data corruption is pretty much impossible.
DEVELOPMENT.md contains information for developers who want to have fun with SimpleOS2
- When your Code works on Qemu but triple faults on VirtualBox, you have missed some very important minor detail in the AMD64 spec
- When your Code works on VirtualBox but triple faults on Qemu, chances are Qemu does not recognize that you've written to the KernelGSBase MSR (you have to write 0 to gs and fs)
- When your SMP Code crashes when booting more that two Processor Cores, they are probably booting on the same stack (took 2 days to find this stupid bug)
- NEVER EVER forget that stacks grow down. I spent multiple days searching seemingly random bugs, just to notice that I allocated a memory area for some stack and forgot that the stack should begin at the end of the allocated space