|
|
1 hónapja | |
|---|---|---|
| .. | ||
| LICENSE | 1 hónapja | |
| Makefile | 1 hónapja | |
| README.md | 1 hónapja | |
| ark_parser.c | 1 hónapja | |
| ark_parser.h | 1 hónapja | |
| build | 1 hónapja | |
| build.c | 1 hónapja | |
| pack_boot.py | 1 hónapja | |
The build orchestration layer for ArkOS. These tools compile, sign, pack, and assemble the entire operating system into bootable disk images.
build.c — Build OrchestratorThe 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):
out_staging/).config existsfb_helper.c with prebuilt Clangswift_splash.swift with swiftcswift_splash binary (Verified Boot)init.c + sha256.c with prebuilt Clangnasmboot.img via pack_boot.pysys.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 ParserA 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 PackagerAssembles 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
See LICENSE for details.