Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NyxOS, rebuilt from scratch in Go — a freestanding 64-bit kernel that boots on bare metal

     


About

Part of the NyxOS family — the same OS, rebuilt from zero in a different language each time. This is the Go cut.

Go is garbage-collected and scheduler-driven, so the interesting part is stripping all of that away: TinyGo compiles the kernel with -gc=none -scheduler=none -panic=trap, leaving a freestanding amd64 object with a C-exported kmain and only a handful of runtime symbols (stubbed, never called). A Multiboot assembly stub enables SSE, identity-maps memory, switches the CPU to long mode, and calls kmain, which paints the banner straight into VGA text memory.

NyxOS-Go booting in QEMU

NyxOS-Go booting in QEMU (GRUB → long mode → Go) on the VGA text buffer

Why Go: garbage-collected, goroutines, a real runtime — which makes a no-GC, no-scheduler bare-metal cut the challenge. A full Go OS was proven feasible by gopher-os.

Build & run

Needs tinygo, nasm, ld, grub-mkrescue + xorriso, and qemu.

make        # -> nyxos-go.iso  (64-bit ELF booted via GRUB)
make run    # boot the ISO in QEMU

Because the kernel is a 64-bit ELF, it boots from a GRUB ISO (qemu -cdrom) rather than qemu -kernel.

Layout

  • kernel.go — the freestanding Go kernel (VGA console), built with TinyGo
  • boot64.asm — Multiboot header + the 32-bit → long-mode trampoline that calls kmain
  • stubs.s — no-op stubs for the three runtime symbols TinyGo leaves undefined
  • linker64.ld — links the 64-bit kernel at 1 MiB, Multiboot header first
  • grub.cfg / Makefile — ISO packaging and boot

Status

Early — it boots and paints the screen. Next up: a GDT/IDT, interrupts, and a VGA console.

About

NyxOS, rebuilt from scratch in Go — a freestanding x86_64 OS. Part of the NyxOS family.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages