TweakTools

tweaktools / tweakos / 0x01

0x01 // kernelactive development

TweakKernel

A freestanding x86_64 kernel written for TweakOS. Not a Linux fork.

hardware
x86_64 · UEFI
language
freestanding C11
abi
Tweak-native handles
I.

About

TweakKernel is the native foundation TweakOS is moving onto. It boots from its own UEFI loader and doesn't use the Linux boot protocol, Multiboot, glibc or a POSIX syscall surface.

Instead of cloning Linux, it defines its own handle-based native ABI. TweakDesktop, TweakShell and TweakPkg are expected to sit on Tweak-native handles. POSIX, if it ever exists, would be a personality on top.

Its primitives are deliberately NT-friendly, so the TweakWin personality can map onto them cheaply. Each stage is proven by booting under QEMU and checking the serial log, with host tests also run under sanitizers.

II.

Where it stands

today
  • Processes, threads and kernel objects with growable per-process handle tables
  • Mutexes with abandonment, wait-all, user APCs and alertable waits
  • Thread suspend/resume and get/set context
  • A named object namespace
  • Image sections with per-page W^X for PE mapping
  • A file object model and I/O completion queues
  • XSAVE/AVX extended state and SMP primitives
next
  • Finishing the current process, thread and I/O runtime
  • Backing the TweakWin personality with native primitives
  • Native backends for TweakShell, TweakDesktop and TweakPkg