Skip to content

LordHerdier/ExoDoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exokernel Doom development repo

Repo layout

  • src/
    • boot.s — Multiboot header + _start entry (sets up stack, calls kernel_main)
    • kernel.c — freestanding C kernel entrypoint (writes to VGA text buffer)
    • linker.ld — places kernel at 2M, defines sections, entrypoint _start
    • grub.cfg — GRUB menu entry that multiboot-loads /boot/exodoom
  • docker/
    • Dockerfile.build — i686-elf cross compiler + GRUB ISO tools
    • Dockerfile.qemu — QEMU runtime image
    • scripts/build.sh — build script run inside the build container
  • Makefile — convenience targets to build + run

Dependencies

Required (host machine)

  • Docker (or compatible: Podman should work if it supports docker CLI well enough)
  • GNU Make

That’s it. No local cross-compiler required.

What Docker images provide

  • techiekeith/gcc-cross-i686-elf base image for i686-elf-gcc / i686-elf-as
  • GRUB + ISO tooling inside the build container (grub-mkrescue, grub-file, xorriso)
  • QEMU inside the run container (qemu-system-i386)

How the build works (high level)

The build container runs docker/scripts/build.sh:

  1. Assemble src/boot.sbuild/boot.o
  2. Compile src/kernel.c (freestanding) → build/kernel.o
  3. Link with src/linker.ldbuild/exodoom
  4. Verify it’s Multiboot-valid using grub-file
  5. Stage an ISO tree under build/isodir/boot/...
  6. Create build/exodoom.iso using grub-mkrescue

Outputs:

  • build/exodoom (kernel ELF)
  • build/exodoom.iso (bootable ISO)

Makefile usage

Build everything (kernel + ISO) in Docker

make docker-build

Build, then boot the ISO in QEMU (GRUB menu)

make docker-run

Build, then boot the kernel directly (no GRUB menu) <--- Recommended for development iteration

make docker-run-kernel

Clean build artifacts

make clean

Keyboard shortcuts

  • Ctrl + A then X to exit QEMU
  • Ctrl + A then C to open QEMU monitor (for debugging)

Notes / gotchas

  • Pressing Enter at the GRUB menu doesn't work right now. Boot directly for the time being, unless debugging the GRUB config.
  • QEMU is run with -display curses and serial attached to your terminal (-serial mon:stdio).
  • The kernel currently writes to VGA text memory at 0xB8000, so you should see output in the QEMU display.
  • If you edit src/grub.cfg, it gets copied into the ISO staging directory during build.

License

MIT License (at least for now, may change later...?)

About

Prototype Exokernel Doom Implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors