Aarav90-cpu 4460d065bf Stash as backup 2 tuần trước cách đây
..
LICENSE 0cdcb6d04c LICENSING 1 tháng trước cách đây
Makefile a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây
README.md 2c40294a47 Boot Phase Done. Added Boot Animation For after kernel initalistion. 1 tháng trước cách đây
ark_parser.c a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây
ark_parser.h a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây
build 4460d065bf Stash as backup 2 tuần trước cách đây
build.c 4460d065bf Stash as backup 2 tuần trước cách đây
cursor2swift.py 4460d065bf Stash as backup 2 tuần trước cách đây
font_gen.py a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây
pack_boot.py a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây
pack_rpi4.py a651b45030 Works on arm64 and x86_64 architecture! Boots sucessfull on QEMU ! INPUT:HDMI0 fails on Input HDMI1!| 3 tuần trước cách đây

README.md

ArkOS Build Tools

The build orchestration layer for ArkOS. These tools compile, sign, pack, and assemble the entire operating system into bootable disk images.

Components

build.c — Build Orchestrator

The main build driver. Accepts the ArkOS base directory as its first argument and executes all build phases sequentially with modular [step/total] progress output.

Usage:

# Called automatically by the top-level Makefile:
./build /path/to/arkos

# Or build the tool manually:
make            # Compiles build.c + ark_parser.c → ./build
make clean      # Removes compiled binary

What it does (14 steps):

  1. Cleans previous build artifacts
  2. Creates staging directories (out_staging/)
  3. Copies frameworks to staging
  4. Copies boot files to staging
  5. Copies vendor files to staging
  6. Verifies kernel .config exists
  7. Compiles fb_helper.c with prebuilt Clang
  8. Compiles swift_splash.swift with swiftc
  9. Signs swift_splash binary (Verified Boot)
  10. Compiles init.c + sha256.c with prebuilt Clang
  11. Packs initramfs (base + init + swift_splash + signature)
  12. Assembles bootloader + stage2 with nasm
  13. Generates boot.img via pack_boot.py
  14. Generates disk images (sys.img, vend.img, avb.img, etc.)

All intermediate artifacts go into out_staging/. Final outputs go into finished/.


ark_parser.c / ark_parser.h.ark Config Parser

A lightweight C library for parsing ArkOS's custom .ark configuration file format.

Supported syntax:

# Comments start with #
key = value           # Global key-value pairs
standalone_value      # Standalone values (e.g., signing keys)

[SectionName]         # Named sections
section_key = value

API:

ArkConfig* ark_parse(const char* filepath);
const char* ark_get_global(ArkConfig* config, const char* key);
const char* ark_get_section_val(ArkConfig* config, const char* section, const char* key);
void ark_set_global(ArkConfig* config, const char* key, const char* value);
void ark_dump(ArkConfig* config, const char* filepath);
void ark_free(ArkConfig* config);

pack_boot.py — Boot Image Packager

Assembles the final boot.img by concatenating the bootloader, stage2, animation frames, kernel, and initramfs into a single raw disk image. Patches stage2 binary variables (LBA offsets, sector counts) in-place.

Usage:

python3 pack_boot.py --base-dir /path/to/arkos

Disk layout:

Sector 0        : Stage 1 bootloader (512 bytes)
Sectors 1-7     : Stage 2 bootloader (3.5 KB)
Sectors 8+      : Animation data
Sectors N+      : bzImage (Linux kernel)
Sectors M+      : initramfs.img

License

See LICENSE for details.