Build Linux initramfs cpio archives from OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(space): service config pipeline, compiled plan, embedded ground station

Wire the service config from build.yml through to pid1:
- Add Content entry type to initramfs for inline data
- Add merge_services, topo_sort_services, codegen_plan to Config
- Build generates per-partition Plan module (OCaml data structure)
and recompiles pid1 with services compiled in — no runtime parsing
- pid1 logs the static service plan on boot

Extract ground station into library and embed in space run:
- New space-ground library with Ground.start (no unix dep, uses eio+ptime)
- space run auto-starts the dashboard as a daemon fiber
- bin/main.ml is now a thin cmdliner wrapper

Also adds log_store for per-partition console log capture.

+6
+2
lib/initramfs.ml
··· 6 6 type entry = 7 7 | Dir of string 8 8 | File of { name : string; path : string } 9 + | Content of { name : string; data : string; perm : int } 9 10 | Tree of string 10 11 11 12 let read_file path = ··· 42 43 let data = read_file path in 43 44 let perm = file_perm path in 44 45 [ Cpio.regular ~perm ~name data ] 46 + | Content { name; data; perm } -> [ Cpio.regular ~perm ~name data ] 45 47 | Tree path -> 46 48 let base = Filename.basename path in 47 49 let acc = [ Cpio.directory ~perm:0o755 base ] in
+4
lib/initramfs.mli
··· 12 12 | Dir of string (** Empty directory. *) 13 13 | File of { name : string; path : string } 14 14 (** File from disk, renamed to [name] in the archive. *) 15 + | Content of { name : string; data : string; perm : int } 16 + (** Inline content, stored as [name] with [perm] permissions. *) 15 17 | Tree of string (** Recursive directory tree. *) 16 18 17 19 val build : entry list -> string ··· 20 22 - [Dir name] creates an empty directory with permissions 0o755. 21 23 - [File { name; path }] reads a file from [path] and stores it as [name], 22 24 preserving the original file permissions. 25 + - [Content { name; data; perm }] stores inline [data] as [name] with [perm] 26 + permissions. 23 27 - [Tree path] recursively walks [path], adding all files and subdirectories 24 28 as cpio entries, preserving permissions. *)