From 0407d9ccbb7c9f08346e927a4b3c4c0d3d7d5e29 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Tue, 21 Jul 2026 06:58:10 +0900 Subject: [PATCH] init: add dormant driver-manager service files (C0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the two dormant service files for the driver-manager post-switchroot + initfs spawner paths. Both files are dormant by default — they require /etc/driver-manager.d/{disabled,initfs-active} to be absent before they activate. The cutover (C1-C4) is operator-ratified; this commit only adds the file presence so the C0 wiring exists. Refs: local/docs/DRIVER-MANAGER-MIGRATION-PLAN.md § 5.2 C0. --- init.d/00_driver-manager.service | 26 +++++++++++++++++++ .../40_driver-manager-initfs.service | 21 +++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 init.d/00_driver-manager.service create mode 100644 init.initfs.d/40_driver-manager-initfs.service diff --git a/init.d/00_driver-manager.service b/init.d/00_driver-manager.service new file mode 100644 index 0000000000..990c999000 --- /dev/null +++ b/init.d/00_driver-manager.service @@ -0,0 +1,26 @@ +# Place this file at: +# local/sources/base/init.d/00_driver-manager.service +# (created during D5/C0 phase; remains dormant until operator ratifies cutover) + +[unit] +description = "Driver manager (post-switchroot /usr spawner)" +# Long-form description: +# Driver manager enumerates /scheme/pci, reads /lib/drivers.d/*.toml, +# matches devices against driver match tables, and spawns driver daemons +# (e1000d, xhcid, ihdgd, etc.) per the manager's SpawnDecision committee +# (see § 5.1 D1 migration plan). Activates only when +# ConditionPathExists for /etc/driver-manager.d/disabled fails AND all +# depends_on schemes (pci, firmware, iommu, numad, etc.) are ready. +# +# Until the D5 feature-complete gate ratifies, this service is dormant — +# pcid-spawner retains the boot path. The dormant flag is enabled by +# default; C0 wiring must explicitly remove it before activation. + +[service] +cmd = "driver-manager" +args = ["--rootfs"] +# oneshot so a hypothetical bind handle error doesn't loop the manager +type = "oneshot_async" +# Operator must explicitly enable this service: +# touch /etc/driver-manager.d/disabled # force fallback to pcid-spawner +ConditionPathExists = "/etc/driver-manager.d/disabled" diff --git a/init.initfs.d/40_driver-manager-initfs.service b/init.initfs.d/40_driver-manager-initfs.service new file mode 100644 index 0000000000..6357efc579 --- /dev/null +++ b/init.initfs.d/40_driver-manager-initfs.service @@ -0,0 +1,21 @@ +# Place this file at: +# local/sources/base/init.initfs.d/40_driver-manager-initfs.service +# (created during D5/C0 phase; remains dormant until operator ratifies cutover) + +[unit] +description = "Driver manager initfs spawner" +requires_weak = ["10_inputd.service", "20_graphics.target", "40_pcid.service"] +# Long-form description: +# Driver manager initfs variant. Replaces 40_pcid-spawner-initfs.service +# once the initfs storage path is fully verified under driver-manager +# in dual-mode observation (C1). Storage-critical drivers (ahcid, ided, +# nvmed, virtio-blkd) bind here before redoxfs mounts the rootfs. + +[service] +cmd = "driver-manager" +args = ["--initfs"] +type = "oneshot" +# Operator must explicitly enable this service by removing the +# ConditionPathExists flag (C2 wiring). Until then, pcid-spawner +# initfs continues to operate. +ConditionPathExists = "/etc/driver-manager.d/initfs-active"