Skip to content

foxcomputer/hane-kernel

HaneOS

HaneOS is a custom 32-bit operating system kernel built from scratch using C and x86 Assembly. It features a polished TTY interface, a custom FAT32 driver, and a clean, artifact-free boot experience.

Features

Core System

  • Kernel: Minimal 32-bit Multiboot-compliant kernel.
  • Boot Process: Zero-flicker clean boot with a custom splash screen animation.
  • Filesystem:
    • Virtual File System (VFS) abstraction.
    • FAT32 Driver (Read-only root directory listing).
    • ATA PIO Mode Disk Driver.

User Interface (TTY)

  • VGA Text Mode: 80x25 with custom driver.
  • Visual Polish:
    • Smooth scrolling.
    • Line wrapping.
    • Selection System: Text selection with inverted color highlighting (Shift + Arrows).
    • Hardware cursor synchronization.
  • Input System:
    • Full PS/2 Keyboard support.
    • Clipboard Ops: Ctrl+Shift+C (Copy), Ctrl+Shift+V (Paste), Ctrl+Shift+X (Cut).
    • Navigation: Arrow keys, Home/End support.

Interactive Shell

  • Prompt: felix@hane:~$ styled prompt with startup greeting.
  • Commands:
    • help: List available commands.
    • clear: Clear screen and scrollback.
    • lsdisk: List files on the ATA Primary Master (FAT32).
    • echo: Print text (supports $HOME expansion).
    • reboot: Restart the system.

Setup & Building

Prerequisites

  • Linux environment (tested on Ubuntu/Debian).
  • gcc (with multilib support for -m32).
  • nasm
  • make
  • qemu-system-i386
  • dosfstools / mtools (for disk image creation).

Building

Compile the kernel and drivers:

make

Running

To run HaneOS with the prepared disk image (required for FAT32 features):

./run_with_image.sh

This script automatically:

  1. Creates a 1GB hane_disk.img.
  2. Formats it as FAT32.
  3. Copies test files (test.txt, hello.c) to it.
  4. Launches QEMU with the kernel and disk attached.

Project Structure

Directory Description
boot/ Bootloader assembly (boot.s) and linker script.
kernel/ Core kernel logic (kernel.c), Interrupt Descriptor Table (IDT), and Console management.
drivers/ Hardware drivers: VGA (vga.c), Keyboard (keyboard.c), ATA (ata.c), FAT32 (fat32.c).
shell/ Shell logic, input parsing, command execution, and TTY state.
hnfs/ HaneOS Virtual Filesystem (vfs.c, hnfs.c).

License

MIT

About

The main HaneOS development repo

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published