Skip to content

KatTheGit/os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS

An attempt at a homemade OS kernel, using wiki.OSDev.org and the necessary docs. I'm making this to learn more about OS dev and the secret low level computer shenanigans.

To do

  • GCC cross-compiler
  • Grub bootloader
    • Bootloader.asm
      • grub-file --is-x86-multiboot
      • Actually test it
        • Set up QEMU and GDB
        • Link kernel and bootloader (link NASM asm and GCC C.)
          • Get it to work
          • Understand how it works and customise
  • Interrupts
    • GDT
    • IDT
  • [ ]
  • Video
    • Basic VGA video for basic debug
    • GPU stuff
      • kms
  • Use a makefile instead of a bash script

Random stuff

xxd
-b (binary dump)
-c 8 (show address every 8 bytes (column size))

x86 is little endian. 0x1234 -> 0x34 0x12

i686-elf-gcc -c src/kernel.c -o target/kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
nasm -f elf32 src/multiboot.asm -o target/multiboot.o
# Link
i686-elf-gcc -T src/linker_script.ld -o target/myos.bin -ffreestanding -O2 -nostdlib target/multiboot.o target/kernel.o -lgcc

Compile

Build a cross-compiler.

gcc 14.2.0 compiled with 15.1.1

binutils 2.43.1 compiled with gcc 15.1.1

run compile.sh

Project structure

  • grub-iso/ directory used to create the grub bootable image with grub-mkrescue
  • kernel_drivers/ directory for hardcoded kernel drivers.

About

An attempt at writing an OS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors