Skip to content

A basic x86 kernel to learn how operating systems get from BIOS to userland

License

Notifications You must be signed in to change notification settings

barrettotte/enki-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enki-os

A basic x86 kernel to learn how operating systems get from BIOS to userland.

This is my first dive into the deep world of operating systems. I hope to make another kernel in the future using the things I learned here. This one still needs a lot of love and care it probably won't get.

Named after Enki, Sumerian god of water, knowledge, crafts, and creation.

Features / Goals

  • Custom bootloader
  • FAT-16 file system (except fwrite)
  • PS/2 keyboard driver
  • Static ELF file loading
  • Partial LibC
  • Process create/manage via TSS
  • Userland with basic shell
  • Basic Multitasking (timer based)

docs/enki-test.png

Building Locally

  • Install dependencies and build cross compiler: make toolchain
  • Build OS image: make
  • Build OS image and launch in QEMU: make qemu
  • Build OS image and launch with GDB connected to QEMU: make debug

TODO Items

  • Proper trapping/exception handling
  • Shift key
  • Scrolling terminal
  • Cursor support
  • Clear terminal
  • Init Floating Point Unit (FPU)
  • Reboot command
  • ACPI
  • PC speaker support
  • Terminal color support
  • Abstraction over PIC
  • Abstraction over timer
  • Gather system info and print on startup (memory, timer, etc)
  • Stack smash protector
  • Multiboot header
  • Dockerfile with toolchain installed? Github action?

Limitations

  • Lazy A20 line enable; Could potentially fail on some systems
  • Memory fragmentation
  • Only one drive supported (master - drive 0)
  • Missing FAT16 write
  • ELF file loading loads entire file into heap memory...
  • Only supports loading static ELF files
  • Simple multitasking via timer
  • Limited process control (no fork or exec)
  • No threading
  • Probably a lot more I'm forgetting...

References