Aarav90-cpu 6e0f7f4dca Forgot a file 1 month ago
..
arkrt fbf2f4ce8a Patch UEFI and BIOS Booting Further. Added OpenSwiftUI Project and updated it to match system packages! (This is the Basic UI. The official UI for the OS is still to be made. HINT:ATOMS) 1 month ago
boot 4722d5edc4 Removed ISO Booting (Will readd that later). Added proper UEFI Booting and patched issues related with BIOS 1 month ago
frameworks fbf2f4ce8a Patch UEFI and BIOS Booting Further. Added OpenSwiftUI Project and updated it to match system packages! (This is the Basic UI. The official UI for the OS is still to be made. HINT:ATOMS) 1 month ago
kernel 2c40294a47 Boot Phase Done. Added Boot Animation For after kernel initalistion. 1 month ago
prebuilts 893a0465c9 Added proper booting method (95%). Rebuilt glibc with new kernel modules. Moved intrid and kernel into boot.img. (Sorry for the precompiled material. It will be removed once cleaning tasks are perfected). 1 month ago
system 4722d5edc4 Removed ISO Booting (Will readd that later). Added proper UEFI Booting and patched issues related with BIOS 1 month ago
vendor 2c40294a47 Boot Phase Done. Added Boot Animation For after kernel initalistion. 1 month ago
.gitignore 2c40294a47 Boot Phase Done. Added Boot Animation For after kernel initalistion. 1 month ago
LICENSE 0cdcb6d04c LICENSING 1 month ago
Makefile fbf2f4ce8a Patch UEFI and BIOS Booting Further. Added OpenSwiftUI Project and updated it to match system packages! (This is the Basic UI. The official UI for the OS is still to be made. HINT:ATOMS) 1 month ago
README.md 7bce80692e Start with arkrt (The ARK-OS Runtime) using Swift 1 month ago
arkos_architecture_guide.md 6e0f7f4dca Forgot a file 1 month ago

README.md

ArkOS

A Linux-based operating system built from scratch — designed to be easy to use, easy to compile, and open for customization.

See ArkOS: Comprehensive System Architecture for more details

✨ Features

Feature Status
Custom BIOS bootloader (stage1 + stage2)
VESA graphics boot animation (60 FPS expanding dot)
Verified Boot (SHA256 key-signed OS binary)
Native Swift splash screen via Linux framebuffer
Linux kernel 7.0 with custom initramfs
Prebuilt Clang/LLVM toolchain
.ark configuration file format
Modular build system with progress output
Service Manager 🔜
Package Manager 🔜

🏗️ Building

Prerequisites

Tool Purpose
clang (prebuilt, included) C compilation
swiftc Swift compilation
nasm x86 assembly
python3 Boot image packing & signing
qemu-system-x86_64 Testing
mkfs.ext4 Disk image generation
cpio, gzip Initramfs packing

Build & Run

cd arkos/
make build    # Compiles everything, generates disk images
make run      # Launches QEMU with the built images
make clean    # Removes all build artifacts

The build system uses the prebuilt Clang toolchain at prebuilts/clang/ for all C compilation. No system compiler dependency.

Build Output

The build system shows modular progress:

╔══════════════════════════════════════╗
║       ArkOS Build System v2.0        ║
╚══════════════════════════════════════╝

[ 1/14] Cleaning previous build
[ 2/14] Creating staging directories
[ 3/14] Integrating frameworks
[ 4/14] Preparing boot files
...
[14/14] Generating disk images

╔══════════════════════════════════════╗
║          Build complete! ✓            ║
╚══════════════════════════════════════╝

Output Images

All images are generated in finished/:

Image Description
boot.img Bootloader + animation + kernel + initramfs
sys.img System partition (frameworks, libraries)
vend.img Vendor partition (DRM, keys, mirror info)
avb.img Android Verified Boot metadata
vbmeta.img Verified boot metadata
dtbo.img Device tree blob overlay

📁 Project Structure

arkos/
├── boot/                    # Bootloader source & configs
│   ├── source/              # Assembly source (bootloader.asm, stage2.asm)
│   │   └── animationframes/ # Pre-generated boot animation frames
│   ├── initramfs.img        # Base initramfs image
│   └── *.ark                # Boot configuration files
├── frameworks/              # OS frameworks (Swift, DRM, SwiftUI)
├── hardware/                # Hardware abstraction layer (future)
├── kernel/                  # Linux kernel source + prebuilt bzImage
├── prebuilts/               # Prebuilt toolchains
│   └── clang/               # LLVM/Clang 22 toolchain
├── system/                  # Core system components
│   ├── init.c               # PID 1 init process (Verified Boot)
│   ├── swift_splash.swift   # Native Swift framebuffer splash
│   ├── sha256.c/h           # SHA256 implementation for signing
│   └── fb_helper.c          # Framebuffer ioctl helper
├── vendor/                  # Vendor-specific files
│   ├── verify/              # Verified Boot keys & signing tools
│   ├── mirror/              # Mirror configuration
│   └── Widewine/            # DRM (Widevine) integration
├── arkrt/                   # ArkOS runtime (future)
├── Makefile                 # Top-level build entry point
└── finished/                # Build output (generated)

🔐 Verified Boot

ArkOS implements a custom Verified Boot chain:

  1. The build system reads the signing key from vendor/verify/securebuild.ark
  2. sign.py computes SHA256(KEY + swift_splash_binary)signature.bin
  3. At boot, init.c recomputes the hash and compares against signature.bin
  4. Mismatch → Kernel Panic (system halts with security warning)
  5. Match → Boot continues into the Swift splash screen

⚠️ Never commit your real signing key to a public repository. Use vendor/verify/key.py to generate new keys.

📄 License

See LICENSE for details.