User:MrOlsen7905/uBixOS

From OSDev Wiki
Jump to navigation Jump to search

uBixOS is a hobby/research operating system for the x86 (i386) platform,

 developed from scratch since 2002. It boots via GRUB2 using the multiboot
 protocol, runs on bare metal or under QEMU, and implements a monolithic kernel
 with a modular subsystem layout, a FreeBSD-derived POSIX userland, and its own
 native copy-on-write filesystem, UbixFS. A second architecture target,
 AArch64 (ARM64), is currently being brought up.
 == Features ==
 * Kernel: Preemptive multitasking with an O(1) scheduler (QoS classes,
   I/O boost, starvation aging); SMP support; x86 protected mode (ring 0/3).
 * Memory: Paged virtual memory with copy-on-write forking and demand-shared
   read-only library pages.
 * Processes & threads: fork/execve, POSIX signals (sigaction/sigprocmask/
   sigsuspend, SIGSTOP/SIGCONT, ZOMBIE/wait4), kernel threads (clone/rfork, TLS,
   futexes) backing musl pthreads.
 * Filesystems: UbixFS (native, copy-on-write, pooled — see below), UFS,
   FAT16/32, DevFS, procfs — all behind a VFS abstraction layer.
 * Networking: lwIP 2.0.3 TCP/IP stack; NE2000, Lance (PCNET), and Intel
   e1000 NIC drivers; DHCP; a TLS/HTTPS client over a BearSSL port.
 * IPC: Custom MPI message passing, POSIX pipes, semaphores.
 * Drivers: AT keyboard, PIT, PIC (8259), floppy, RS-232 serial, PCI IDE
   hard disk, PS/2 mouse, USB mass storage.
 * GUI: Composited window system (views) with server-side decorations,
   a taskbar, and a VT100 terminal — apps render with the objGFX library
   (TrueType antialiased fonts) into shared-memory buffers.
 * Userland: 30+ utilities including tcsh 6.24.16; FreeBSD-derived libc
   (musl-linked runtime); a C++ runtime (libc++ subset); a port of the NetSurf
   web browser (HTML/CSS render, JavaScript via Duktape, images, input).
 * ELF loader: Loads and runs standard i386 ELF binaries with a runtime
   dynamic linker.
 == UbixFS ==
 uBixOS's native filesystem is a "lite ZFS": a copy-on-write storage pool
 with datasets (a POSIX filesystem and a raw block volume for swap),
 per-block checksums (Fletcher4), an uberblock/transaction-group commit model
 (crash-consistent with no journal), POSIX permissions/owners/times, symlinks,
 variable record sizes, and a pluggable compression slot. Snapshots are deferred
 but the on-disk format reserves the hooks for them. The engine is portable C,
 shared between an unprivileged host image tool and the kernel driver.
 == Architectures ==
 * i386 (x86, 32-bit) — the primary, mature target. Boots GRUB2 → kernel →
   init → login shell; runs the full userland and GUI under QEMU and on bare metal.
 * AArch64 (ARM64) — port in progress. Boots headless under QEMU virt
   (HVF-accelerated on Apple Silicon) through to an interactive login and shell,
   with a musl userland over the FreeBSD-style syscall ABI. The source tree is
   organized so architecture-specific code lives under arch/<arch>/
   while the bulk of the kernel stays architecture-agnostic. Real-silicon
   bring-up (Allwinner H618 / RK3566-class boards) is the next milestone.
 == Building ==
 The project uses BSD make (bmake). On macOS the build auto-detects
 an x86_64-elf-gcc -m32 cross toolchain; on FreeBSD the host
 toolchain is used directly.
  bmake                    # build kernel + world (i386)
  bmake image              # build a bootable FAT32 disk image
  bmake run                # launch in QEMU
  bmake kernel TARGET=aarch64      # build the AArch64 kernel
  bmake run-debug TARGET=aarch64   # boot it headless in QEMU virt
 == History ==
 
 uBixOS has been in development since 2002. It is written and maintained by
 Christopher W. Olsen. The current release series is the 2.x line
 (v2.3.0-BETA as of this writing).