Welcome to hhuOS, a small operating system written in C and Assembler for the x86-architecture. The main purpose of this project is to show how different aspects of operating systems theory can be implemented and linked together. The system is not aimed to be a full-featured operating system for daily use.
Check out our website!
GCC 7 and CMake 3.14 or newer versions of GCC and CMake are required to compile hhuOS.
Before the kernel can be compiled, some packages must be installed. To install them, you can run the following command (on Ubuntu 20.04):
sudo apt install cmake make nasm gcc-multilib g -multilib grub-pc-bin grub-efi-ia32-bin dosfstools mtools xorriso zstd unzip wget
To test hhuOS quickly in QEMU, you can issue the following commands.
git clone https://github.com/hhuOS/hhuOS.git
cd hhuOS/
git submodule init
git submodule update
./build.sh
./run.sh
hhuOS implements the Multiboot standard and can (in theory) be booted by any Multiboot compliant bootloader. Per default, our own bootloader towboot is used for booting hhuOS. However, it is possible to boot hhuOS using GRUB. Since towboot only support UEFI-based systems, it is necessary to use GRUB for booting hhuOS on (older) BIOS-based systems. To use GRUB, it is necessary to pass the --target
parameter to the build script, indicating that GRUB should be used when constructing the bootable image
./build.sh --target grub
This will result a .iso
file (instead of the .img
file, when using towboot), which needs to be passed to the run script:
./run.sh --file hhuOS.iso
hhuOS is able to boot on BIOS- as well as UEFI-based systems. To test both configurations, the run script provides an option to choose between BIOS and UEFI.
We use the EDK2 OVMF image to test hhuOS. The run script automatically downloads the latest version from the Arch Linux Repositories.
Since towboot only supports UEFI-based systems, GRUB is needed to test hhuOS on BIOS-based systems (see Bootloader).
To run hhuOS with GRUB on a BIOS-based machine, use:
./run.sh --file hhuOS.iso --bios true
hhuOS can be configured via kernel parameters, that are passed to the system by the bootloader. The following parameters are available:
log_level
is used to set the log level. Valid levels aretrc
,dbg
,inf
,wrn
anderr
.log_ports
is used to enable log output via serial or parallel ports. Valid values areCOM1
,COM2
,COM3
,COM4
,LPT1
,LPT2
,LPT3
. Multiple ports may be specified via a comma-separated list.root
is used to set device to mount as root filesystem and the filesystem driver to use (e.gfloppy0,Filesystem::Fat::FatDriver
).bios
can be set totrue
to activate support for BIOS-calls. This enables support for VESA and CGA graphics modes. CAUTION: Enabling this option will cause hhuOS to not boot on most UEFI-based systems.lfb_provider
is used to set the framebuffer-implementation, that should be used to draw on the screen. The default implementation is namedKernel::Multiboot::MultibootLinearFrameBufferProvider
and should always work (as long as the bootloader finds a video mode). However, the resolution stays fixed with this configuration. If BIOS-calls are activated,Device::Graphic::VesaBiosExtensions
may be used to enable support for multiple resolutions and resolution switching.text_provider
is used to set the implementation for drawing text on the screen. The default implementation is namedDevice::Graphic::LinearFrameBufferTerminalProvider
and uses rasterized fonts to draw on an underlying linear framebuffer. It works withlfb_provider
being set toKernel::Multiboot::MultibootLinearFrameBufferProvider
orDevice::Graphic::VesaBiosExtensions
. As an alternative, it may be set toDevice::Graphic::ColorGraphicsAdapterProvider
(with activated BIOS-calls), to make use of CGA text modes, providing a higher drawing speed, but lower resolutions and only 16 colors.
Assets for the platformer game:
- Platform, Chest and Player by Bayat Games
- Item Block by Moon Empire
- Cake Item by bevouliin.com
- Ninja by Robocelot
- Lava by Tio Aimar
- Projectile by Game Developer Studio
- Brick Block by PolygonixGames
- Solid Block by Kenney