feat: init - dynamic service discovery via init.toml

This commit is contained in:
2026-08-10 17:00:52 +02:00
parent e25ef470e0
commit 69725658cf
4 changed files with 174 additions and 27 deletions
+20 -10
View File
@@ -7,25 +7,35 @@
.SH DESCRIPTION
init is the first userspace process started by the MontaukOS
kernel. It chains system services in sequence, then launches
the interactive shell.
kernel. It discovers system services from 0:/config/init.toml
and starts them in the order their tables appear in that file.
Each service is spawned as a child process. init waits for it
to exit before starting the next one. If a service fails to
spawn, init logs an error and continues to the next stage.
Each enabled service is spawned as a child process. Services may
run in the background or block startup until they exit. Disabled
services are logged and skipped.
Log output is timestamped and color-coded:
HH:MM:SS INFO init Starting dhcp
HH:MM:SS OK init dhcp finished (pid 1)
.SH BOOT SEQUENCE
The following services are started in order:
.SH CONFIGURATION
Each service is declared as a named TOML table:
1. 0:/os/dhcp.elf Obtain network configuration via DHCP
2. 0:/os/shell.elf Launch the interactive shell
[services.dhcp]
path = "0:/os/dhcp.elf"
enabled = true
wait = false
After the shell exits, init enters an idle loop.
path is required. name controls the name shown in the boot log and
defaults to the table name. enabled and wait both default to true.
optional skips a service whose executable is not installed.
fallback names another configured service to start if spawning the
service fails. A service with fallback_only = true is available as
a fallback but is not started during the normal pass.
After all foreground services exit, init enters an idle loop.
.SH LOG LEVELS
init uses four log levels, each with a distinct color: