Commit Graph

23 Commits

Author SHA1 Message Date
bjorn3 5712c8f34c drivers/graphics/vesad: Remove unnecessary env var inherit in service 2026-04-05 13:09:45 +02:00
bjorn3 0380521186 zerod: Don't require a copy named nulld for /dev/null
This saves 600kb on the initfs size.
2026-03-07 17:40:55 +01:00
bjorn3 a063db73a4 init: Support unit instancing
And use it for the logging ramfs by having a generic ramfs unit.
2026-03-05 19:42:17 +01:00
bjorn3 7cea939540 init: Switch root upon reaching initfs.target 2026-03-04 21:53:48 +01:00
bjorn3 6d243d666c init: Convert rootfs to a service
With this the entire initfs now uses service definitions.
2026-02-28 17:03:25 +01:00
bjorn3 e86dbfa17e Init: Introduce support for conditionally spawning services
depending on the architecture and selected board. With this the
migration of initfs daemons to service definitions is almost done.
2026-02-28 16:55:26 +01:00
bjorn3 124f11bde1 init: Convert all service definitions to toml 2026-02-26 17:41:39 +01:00
bjorn3 a5041f7d7a init: Add missing vesad dependency to fbbootlogd 2026-02-26 17:03:14 +01:00
bjorn3 3d2951a23d init: Convert vesad, fbbootlogd and fbcond to services 2026-02-26 16:38:56 +01:00
bjorn3 31489ce7ca init: Convert inputd and lived to services 2026-02-26 16:03:41 +01:00
bjorn3 72b96695b0 init: Add a couple of service descriptions 2026-02-26 15:38:14 +01:00
bjorn3 fb051cd486 init: Special case logd
Logd is a special case. Every other service effectively has an implicit
dependency on it for sending log messages to it and even init itself
depends on it for it's own log messages.
2026-02-26 15:18:19 +01:00
bjorn3 bb2a00114f init: Introduce dependency handling 2026-02-25 22:43:11 +01:00
bjorn3 6fcb07e7dd init: Introduce UnitStore
This will be necessary to store persistent information about units like
if they are currently started and which process is associated with them.
2026-02-25 22:06:25 +01:00
bjorn3 73cc0b0a07 init: Begin introducing units
Dependencies are not yet functional.
2026-02-25 20:57:47 +01:00
bjorn3 f364bf1f60 init: Introduce a json format for services
While I would have like to use toml, something inside the toml crate
seems to be using randomness, which is not yet available when init
starts.
2026-02-25 20:18:42 +01:00
bjorn3 87abd3fb70 init: Maintain default service env vars separate from init env vars
With this only the env vars set using export or explicitly specify for a
service are passed to services (in addition to RUST_BACKTRACE, PATH and
LD_LIBRARY_PATH). As such we no longer need to manually unset bootloader
env vars to keep the environment clean. And finally this means that env
var substitutions in shell scripts always use the bootloader provided
env vars rather than locally specified ones.

This does regress multi monitor support when there is no proper graphics
driver.
2026-02-19 21:06:53 +01:00
bjorn3 b7524c3a65 init: Allow passing env vars to individual services 2026-02-19 20:50:48 +01:00
bjorn3 029f56eebe init: Remove cd command
The working directory doesn't matter for services and login sessions
already cd to the user home directory. This removes one source of global
state manipulation.
2026-02-19 20:26:51 +01:00
bjorn3 0227c0677c init: Introduce switchroot command
This sets PATH, LD_LIBRARY_PATH and runs init scripts for the new root.
In the future this could replace the entire set of services that should
run, restarting any services for which a newer executable is available
in the new root and stopping any services which don't exist in the new
root. This behavior could also be useful for soft-reboots in the future
to handle updates without rebooting the entire system.
2026-02-19 20:18:07 +01:00
bjorn3 7ebeceb41d init: Allow init to register the scheme for a daemon
Unfortunately the scheme still has to be created by the daemon due to a
kernel bug, but once that is fixed, it would allow delayed spawning of
scheme daemons.
2026-02-18 22:40:09 +01:00
bjorn3 7dad7af1f0 init: Explicitly specify LD_LIBRARY_PATH in init scripts 2026-02-18 21:46:08 +01:00
bjorn3 b997641418 Split up init.rc 2026-02-17 22:26:04 +01:00