VoluSys Get started

Building from source

One Python script builds the loader, the kernel and the generated assets.

Requirements#

ToolUsed for
LLVM: clang, ld.lld, lld-linkCross-compiling the kernel (x86_64-unknown-none-elf) and the UEFI loader (x86_64-unknown-windows, linked as an EFI application)
NASMEntry code, interrupt stubs, embedded assets
Python 3 with Pillow and matplotlibbuild.py; tools/gen_assets.py rasterises the DejaVu fonts and draws the icons
QEMU + OVMF/EDK2Running it (optional)

Build#

python build.py          # incremental, parallel
python build.py clean    # start over

Output goes to build/esp, a ready-made EFI system partition:

build/esp/EFI/BOOT/BOOTX64.EFI     # UEFI loader
build/esp/VOLUSYS/KERNEL.ELF       # kernel + embedded fonts, icons, sample media
build/esp/VOLUSYS/CONFIG.TXT       # boot options

The kernel is compiled freestanding with -O2, without a red zone, as position-independent code, using SSE2 but not AVX, so it runs on any x86_64 CPU.

Run#

.\run.ps1                         # QEMU window
.\run.ps1 -Headless -MonPort 4644 -QmpPort 4645
.\run.ps1 -Audio hda -AudioDriver dsound
.\run.ps1 -Usb -UsbHub            # USB input through a hub

The serial console is written to build/serial.log.

Automate it#

tools/qmon.py drives a running VM through the QEMU monitor and QMP. That’s how the screenshots on this site were taken:

# rebuild and reboot a headless VM on your own ports
powershell -File tools/cycle.ps1 -MonPort 4644 -QmpPort 4645
# then
QMON_PORT=4644 QMP_PORT=4645 python tools/qmon.py shot out.png
QMON_PORT=4644 QMP_PORT=4645 python tools/qmon.py click 1043 1032
QMON_PORT=4644 QMP_PORT=4645 python tools/qmon.py type "neofetch"
QMON_PORT=4644 QMP_PORT=4645 python tools/qmon.py cmd "sendkey ret"
# stop only your instance
powershell -File tools/stopqemu.ps1 -MonPort 4644
Several VMs at once

Give each VM its own monitor and QMP ports, and stop only your own instance with stopqemu.ps1 -MonPort.

Generated assets#

  • tools/gen_assets.py: font atlases (DejaVu, Bitstream Vera licence) and app icons.
  • tools/gen_music.py, tools/gen_pictures.py: the bundled demo tracks and sample pictures.
  • tools/gen_testpages.py: offline pages for browser testing.