+# The Lunaix Project
+
+The Lunaix, LunaixOS, or Lunaix kernel to be exact, is a multi-architectural general purpose kernel written from scratch by the author *independently*. And it is the author's years-long personal endeavor and also a challenge to oneself for writing a functioning kernel **without** any external reference such as existing implementation, tutorial and books (with code) on kernel design.
+
+The overall design is aimed to be modern and POSIX-compliance. In a nutshell, Lunaix is:
+
++ fully-preemptive
++ modular design with configurable components at compile-time and extendable subsystems
++ high-performance by utilising advanced caching techniques and infrastructure.
++ fault-tolerance with sophisticated builtin error handling and tracing techniques.
++ robust in nature with techniques such as proactive deadlock detection and driver isolation mechanism.
+
+To give a better understanding (and appreciation) of the works, the following list has been compiled with all feature that lunaix currently supported:
+
++ Multi-ISA
+ + x86_32
+ + x86_64
+ + Aarch64 (W.I.P)
++ Boot protocol abstraction
++ Platform resource management and definition
+ + ACPI
+ + Devicetree
++ Memory management
+ + multi-architecture abstraction
+ + on-demand paging
+ + copy-on-write and page sharing
+ + compound page support
+ + explicit huge page support (sorry, not THP!)
+ + reverse mapping indexing (rmap)
+ + memory compaction (W.I.P)
+ + slab-alike object allocator
++ Multi-threadingg and multi-tasking
+ + Protection level and memory space isolation
+ + Native threading support (no more lightweight process nonsense)
+ + Signal handling
+ + Kernel-level multi-tasking (i.e. kernel threads)
+ + Round-robin scheduling (for now)
+ + Fully-preemptive kernel design
+ + taskfs: file system interface to process and threads
++ File system
+ + virtual file system framework
+ + ...with POSIX compliant file system interface
+ + mountable file system
+ + page cache for file IO
+ + node cache for vfs structure representation.
+ + ext2 (rev.0, rev.1)
+ + iso9660 (rock-ridge)
+ + twifs: file system interface to kernel states.
++ Device management and interrupt handling
+ + architectural decoupled design
+ + generalised driver framework
+ + generalised irq framework
+ + driver modularisation design
+ + support asynchronous device model
+ + devfs: file system interface to device subsystem
++ Block I/O (blkio)
+ + generalised block IO interface and encapsulation
+ + blkio request caching
+ + asynchronous blkio operation in nature
++ Serial I/O
+ + POSIX-compliant serial port model
+ + serial device driver framework (part of driver framework)
++ Caching Infrastructure
+ + primtive: generic sparse associative array
+ + LRU replacement policy and pooling
+ + kernel daemon for periodical cache eviction
++ Error handling and detection
+ + stack back-tracing with symbol resolution
+ + nested exception unfolding
+ + CPU state dumping
+ + Deadlock/hung-up detection
+
+For the device driver that is currently support see below:
+
++ Arhcitecture Neutral
+ + UART 16650-compatible driver
+ + Serial ATA AHCI
+ + PCI 3.0
+ + PCIe 1.1
+ + Standard VGA
++ Intel x86
+ + RTC (Intel PCH)
+ + IOAPIC irq controller
+ + APIC Timer
+ + Legacy i8042 keyboard controller
++ ARM
+ + GICv3
+ + PL011 (W.I.P)
+
+By the way, do you know there is an online video course by the author on the design of lunaix? [Check it out](https://space.bilibili.com/12995787/channel/collectiondetail?sid=196337) (although it is in Chinese!)
+
+## Project Structure
+
+| | |
+|-----|------|
+| [lunaix-os](../lunaix-os/) | LunaixOS source code |
+| [slides](../slides/) | Slides used in my videos |
+| [reference-material](../reference-material/)| References |
+
+## Compile and Build
+
+You will need following dependencies in order to build Lunaix
+
++ gcc (recommend v12+)
++ binutils
++ make
++ python (recommend v3.11+)