~sircmpwn/helios

An experimental microkernel
Fixes after hare checkless for loops
init: initialize page tables for complete PHDR
vulcan/rt: add u64tos

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~sircmpwn/helios
read/write
git@git.sr.ht:~sircmpwn/helios

You can also use your local clone with git send-email.

#Helios microkernel

An experimental microkernel inspired by seL4. Work in progress.

Supports:

  • x86_64
  • aarch64 (WIP)

We meet in the #helios channel on irc.libera.chat.

#Building Helios

First, install the necessary dependencies for your target.

#Dependencies

Dependencies common to all targets:

  • An up-to-date Hare toolchain
  • binutils (for your target)

Additional dependencies (aarch64):

  • binutils target: aarch64-none-elf-*
  • dtc
  • mtools
  • parted

Additional dependencies (x86_64):

  • binutils target: x86_64-*
  • syslinux
  • xorriso

Additional dependencies (debugging):

  • qemu-system-$target
  • gdb (or gdb-multiarch if cross compiling)
  • edk2 (provides AAVMF) for aarch64

#Configuring Helios

To build Helios, copy config.def.mk to config.mk and edit according to your needs. The defaults are suitable for building an x86_64 kernel from an x86_64 host. To cross compile, update the names of AS, LD, and OBJCOPY accordingly (e.g. AS=aarch64-none-elf-as), and consider setting GDB to gdb-multiarch for debugging.

#Building Helios

Run make to build the kernel and the bootloader for your target. The kernel is always written to ./helios.

Default build targets (aarch64)

make produces boot/+aarch64/bootaa64.efi, which is an EFI-compatible bootloader. After setting up an EFI environment on your target (e.g. via edk2), place boot/+aarch64/bootaa64.efi at /EFI/boot/bootaa64.efi on your boot media, and place Helios at /helios. Optionally, place a device tree at /helios.dtb if the EFI environment does not provide one automatically. Additional boot modules are loaded from /modules/* in alphabetical order; the first one should be the init program.

Default build targets (x86_64)

make produces boot/+x86_64/boot.bin, which is a multiboot compatible bootloader that can be booted with e.g. syslinux or grub. ./boot.iso is also produced, which may be written to a USB stick and booted on hardware. The bootloader expects the kernel as the first multiboot module, and the init program as the second. See boot/+x86_64/syslinux.cfg for an example syslinux configuration to boot Helios on x86_64.

#Running or installing Helios

Helios must be paired with a userspace to be useful. The kernel tree includes a simple userspace for testing the kernel, vulcan, which can be booted with the following methods:

Running Helios in a virtual machine

Run make nographic to boot Helios in qemu with a serial console attached to stdin/stdout. make nographic-gdb will run the same configuration but pause for the gdb debugger to attach to the virtual machine; make gdbc in a second terminal will perform this step. make run will boot a virtual machine with a display attached; this is not supported by all architectures.

Running the test suite

make check will build and run the Vulcan test suite.