https://wiki.osdev.org/Bare_Bones#Booting_the_Operating_System
gcc cross compiler @ ~/opt/cross/ / i686-elf @ ~/opt/cross/i686-elf/bin/
Assemble boot.s
$ i686-elf-as boot.s -o boot.oCompile the kernel
$ i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -WextraLinking the kernel
$ i686-elf-gcc -T linker.ld -o myos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgccTo check whether grub could find the multiboot header in first 8KiB
$ grub-file --is-x86-multiboot myos.bin # exits silently if passed, else $? setTo make cdrom image, first create dirs: isodir/boot/grub/ with kernel in boot/ and grub.cfg in boot/grub
$ grub-mkrescue -o myos.iso isodirBoot the iso
$ qemu-system-i386 -cdrom myos.isoBoot the kernel
$ qemu-system-i386 -kernel myos.bin-> Need Interrupts -> Need Interrupt Descriptor Table -> Need Global Descriptor Table
https://wiki.osdev.org/GDT_Tutorial
- Paging is currently disabled
- Assumed im non-flat (base != 0)
- Hardcoded the gdt entries
- Switched from AT&T to NASM