Skip to content

chaoyangnz/cosmos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

65 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

cosmos

what is it?

Cosmos is my world in bare bone - a kernel running as you like. This is my own attempt to gain back my interest in system programming.

Current status and roadmap

  • set up development environment powered by QEMU, CMake, CLion, GCC cross compiling toolchain and NASM
  • minimal C standard library (libc) for kernel development
  • handover the boot from multiboot and enable x86 protect mode
  • setup GDT and segments for flat memory model
  • setup page directory, page table and enable paging
  • relocate the kernel to higher half virtual address space (start from 3G)
  • setup IDT and remap PIC IRQs to interrupts 32 ~ 47
  • VGA frame buffer driver
  • PS/2 keyboard driver
  • physical memory manager and page frame allocator
  • virtual memory manager and separate virtual memory space per process
  • user land
  • system calls
  • file system
  • consistent device driver interface and device manager

install tools

# Install cmake, qemu
brew install qemu cmake cdrtools

# install cross build toolchain
brew tap nativeos/i386-elf-toolchain
brew install nasm i386-elf-binutils i386-elf-gcc i386-elf-gdb i386-elf-grub

Build & Run

./build.sh

Debug

Once the kernel is running, you can use GDB to remote debug in port 1234. CLion has a good support of visual debugging. Create a Remote Debug config, and set break points in code. It rolls!

Credits

About

๐ŸŽ„๐ŸŽ…A kernel for my delight of system programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors