A simple monolithic Unix-ish kernel
Update README.md
sys: ps2kbd: handle extended scancodes
ports: add doom to base system


browse  log 



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


A simple monolithic Unix-like operating system.

#Bunnix cross toolchain

A GNU toolchain configured for an x86_64-bunnix target is required to compile Bunnix. Fetch the binutils and gcc trees from here:

You must configure these with the Bunnix sysroot you will be using for your build. The build system places this at $srcdir/target/root/ by default.

First run "make bootstrap" to initialize the sysroot. This will print the path to the configured sysroot. Assuming $sysroot refers to this path, an example binutils configuration could be:

./configure \
    --target=x86_64-bunnix \
    --prefix=/usr/local \
    --with-sysroot=$sysroot \
    --disable-werror \
make install

And GCC:

./configure \
    --target=x86_64-bunnix \
    --prefix=/usr/local \
    --with-sysroot=$sysroot \
    --enable-languages=c,c++ \
    --disable-gcov \
make all-gcc all-target-libgcc
make install-gcc install-target-libgcc
make all-target-libstdc++-v3
make install-target-libstdc++-v3

#Building Bunnix

You need the following:

  • binutils and gcc configured for x86_64-bunnix (see above)
  • An up-to-date Hare toolchain. Bunnix tracks Hare master, not the latest stable release.
  • GNU make
  • e2fsprogs
  • mtools
  • sfdisk
  • xorriso
  • qemu-system-x86_64 and qemu-img
  • scdoc
  • yacc

To build with EFI support:

  • binutils and gcc configured for x86-64-w64-migw32
  • OVMF (only requried if PREFER_EFI=1, for qemu)

To build with legacy boot support:

  • syslinux

Copy conf/x86_64.mk to config.mk and to taste before moving on.

Use make to compile Bunnix. The following targets are available:

  • make: builds target/bunnix.iso, which can be written to storage media and booted on real hardware
  • make nographic: build and run Bunnix in qemu with the serial console connected to stdin/out
  • make run: build and run Bunnix in qemu with the SDL backend
  • make nographic-gdb: nographic but waits for gdb
  • make gdb: run but waits for gdb
  • make gdbc: connect gdbc to a waiting qemu instance

#Source code layout

Important directories:

  • bin: contents of /bin (core utilities)
  • boot: bootloaders
  • etc: contents of /etc (e.g. /etc/rc)
  • lib: libc, Hare standard library for userspace
  • ports: optional third-party software
  • sbin: contents of /sbin (critical system utilities)
  • sys: kernel source
  • usr.share: man pages
  • vendor: critical third-party software

#Included third-party software

Bunnix includes (often patched versions of) the following third-party software:

* sbase is good software written by questionable people. I do not endorse suckless.