| { |
| children: [ |
| { |
| name: "archivist", |
| url: "fuchsia-boot:///#meta/archivist.cm", |
| }, |
| { |
| name: "device_name_provider", |
| url: "fuchsia-boot:///#meta/device-name-provider.cm", |
| }, |
| { |
| name: "driver_manager", |
| url: "fuchsia-boot:///#meta/driver_manager.cm", |
| environment: "#driver_manager-env", |
| }, |
| { |
| name: "fshost", |
| url: "fuchsia-boot:///#meta/fshost.cm", |
| environment: "#fshost-env", |
| }, |
| { |
| name: "console", |
| url: "fuchsia-boot:///#meta/console.cm", |
| |
| // Usually, console is started when console-launcher starts. But, startup eager is |
| // required because in products with console.shell=false, console-launcher exits |
| // early and does not start console; it should be started in order to get serial logs. |
| startup: "eager", |
| }, |
| { |
| name: "console-launcher", |
| url: "fuchsia-boot:///#meta/console-launcher.cm", |
| startup: "eager", |
| }, |
| { |
| name: "decompressor", |
| url: "fuchsia-boot:///#meta/decompressor-sandbox.cm", |
| }, |
| { |
| name: "miscsvc", |
| url: "fuchsia-boot:///#meta/miscsvc.cm", |
| }, |
| { |
| name: "netsvc", |
| url: "fuchsia-boot:///#meta/netsvc.cm", |
| startup: "eager", |
| }, |
| { |
| name: "ptysvc", |
| url: "fuchsia-boot:///#meta/ptysvc.cm", |
| }, |
| { |
| name: "pwrbtn-monitor", |
| url: "fuchsia-boot:///#meta/pwrbtn-monitor.cm", |
| |
| // pwrbtn-monitor only consumes capabilities, it doesn't provide |
| // any, so there's no other way to start it. |
| startup: "eager", |
| }, |
| { |
| name: "shutdown_shim", |
| url: "fuchsia-boot:///#meta/shutdown-shim.cm", |
| }, |
| { |
| name: "svchost", |
| url: "fuchsia-boot:///#meta/svchost.cm", |
| |
| // Start eager in order to register the crash handler as early as |
| // possible. |
| startup: "eager", |
| }, |
| { |
| name: "sysinfo", |
| url: "fuchsia-boot:///#meta/sysinfo.cm", |
| }, |
| { |
| // base_resolver is present on all product configurations except |
| // bringup builds, as its dependency pkgfs is not available on |
| // bringup builds either. |
| name: "base_resolver", |
| url: "fuchsia-boot:///#meta/base-resolver.cm", |
| }, |
| { |
| name: "power_manager", |
| url: "fuchsia-boot:///#meta/power-manager.cm", |
| }, |
| { |
| name: "virtual_console", |
| url: "fuchsia-boot:///#meta/virtual-console.cm", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.ReadOnlyLog", |
| "fuchsia.boot.WriteOnlyLog", |
| ], |
| from: "parent", |
| to: [ "#virtual_console" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.FactoryItems", |
| "fuchsia.boot.Items", |
| "fuchsia.boot.ReadOnlyLog", |
| "fuchsia.boot.RootResource", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.cobalt.LoggerFactory", |
| "fuchsia.exception.Handler", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.kernel.RootJobForInspect", |
| "fuchsia.kernel.Stats", |
| "fuchsia.metrics.MetricEventLoggerFactory", |
| "fuchsia.net.NameLookup", |
| "fuchsia.net.stack.Log", |
| "fuchsia.net.stack.Stack", |
| "fuchsia.netstack.Netstack", |
| "fuchsia.pkg.PackageResolver", |
| "fuchsia.pkg.RepositoryManager", |
| "fuchsia.pkg.rewrite.Engine", |
| "fuchsia.posix.socket.Provider", |
| "fuchsia.process.Launcher", |
| "fuchsia.process.Resolver", |
| "fuchsia.sys.Environment", |
| "fuchsia.sys.Launcher", |
| "fuchsia.sys.Loader", |
| "fuchsia.tracing.controller.Controller", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| to: [ |
| "#console-launcher", |
| "#driver_manager", |
| "#fshost", |
| "#miscsvc", |
| "#netsvc", |
| ], |
| rights: [ "rx*" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.Items", |
| "fuchsia.boot.RootResource", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.process.Launcher", |
| "fuchsia.process.Resolver", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ "fuchsia.power.manager.DriverManagerRegistration" ], |
| from: "#power_manager", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ "fuchsia.kernel.Stats" ], |
| from: "parent", |
| to: [ "#power_manager" ], |
| }, |
| { |
| protocol: "fuchsia.boot.RootResource", |
| from: "parent", |
| to: [ "#console" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.Items", |
| "fuchsia.process.Launcher", |
| ], |
| from: "parent", |
| to: [ "#fshost" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.process.Launcher", |
| ], |
| from: "parent", |
| to: [ "#miscsvc" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.RootResource", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.exception.Handler", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.virtualconsole.SessionManager", |
| ], |
| from: "parent", |
| to: [ "#svchost" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.WriteOnlyLog", |
| ], |
| from: "parent", |
| to: [ "#device_name_provider" ], |
| }, |
| { |
| protocol: [ "fuchsia.boot.WriteOnlyLog" ], |
| from: "parent", |
| to: [ |
| "#console", |
| "#fshost", |
| "#ptysvc", |
| "#pwrbtn-monitor", |
| "#shutdown_shim", |
| "#sysinfo", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.cobalt.LoggerFactory", |
| "fuchsia.metrics.MetricEventLoggerFactory", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#fshost", |
| "#power_manager", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.kernel.VmexResource" ], |
| from: "parent", |
| to: [ "#fshost" ], |
| }, |
| { |
| protocol: [ "fuchsia.scheduler.ProfileProvider" ], |
| from: "#svchost", |
| to: [ |
| "#decompressor", |
| "#fshost", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.tracing.provider.Registry" ], |
| from: "parent", |
| to: [ "#decompressor" ], |
| }, |
| { |
| protocol: [ "fuchsia.blobfs.internal.DecompressorCreator" ], |
| from: "#decompressor", |
| to: [ "#fshost" ], |
| }, |
| { |
| // TODO(fxbug.dev/34633): DEPRECATED. Do not add new dependencies on the fshost |
| // loader service! |
| protocol: "fuchsia.fshost.Loader", |
| from: "#fshost", |
| to: [ "#driver_manager" ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: [ "fuchsia.virtualconsole.SessionManager" ], |
| from: "#virtual_console", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.tracing.kernel.Controller", |
| "fuchsia.tracing.kernel.Reader", |
| ], |
| from: "#svchost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.device.manager.Administrator", |
| "fuchsia.device.manager.BindDebugger", |
| "fuchsia.device.manager.DebugDumper", |
| ], |
| from: "#driver_manager", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| "#svchost", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.scheduler.ProfileProvider" ], |
| from: "#svchost", |
| to: [ "#driver_manager" ], |
| |
| // This must be weak because svchost needs sysmem from driver_manager, which creates |
| // a cycle. Sysmem can be pulled out of svchost to break this cycle. |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.DebugBroker", |
| "fuchsia.scheduler.ProfileProvider", |
| "fuchsia.sysmem.Allocator", |
| ], |
| from: "#svchost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.sysmem.Allocator" ], |
| from: "#svchost", |
| to: [ "#virtual_console" ], |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| to: [ |
| "#console-launcher", |
| "#device_name_provider", |
| "#fshost", |
| "#miscsvc", |
| "#netsvc", |
| "#sysinfo", |
| "#virtual_console", |
| ], |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| as: "input-report", |
| to: [ "#virtual_console" ], |
| subdir: "class/input-report", |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| as: "sysmem", |
| to: [ "#svchost" ], |
| subdir: "class/sysmem", |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| as: "display-controller", |
| to: [ "#virtual_console" ], |
| subdir: "class/display-controller", |
| }, |
| { |
| directory: "minfs", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "pkgfs", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "system-delayed", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#driver_manager", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "system", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#driver_manager", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "blob", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "install", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "tmp", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "bin", |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| directory: "volume", |
| from: "#fshost", |
| to: [ "#miscsvc" ], |
| }, |
| |
| // Offer the log services to the console |
| { |
| protocol: [ "fuchsia.logger.Log" ], |
| from: "#archivist", |
| to: [ "#console" ], |
| }, |
| |
| // Offer the kernel serial console to the console-launcher |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#console", |
| as: "console", |
| to: [ "#console-launcher" ], |
| }, |
| { |
| protocol: "fuchsia.device.NameProvider", |
| from: "#device_name_provider", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| |
| // TODO: Once svchost is spawned by component manager, we can |
| // remove this. |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#ptysvc", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| "#virtual_console", |
| ], |
| }, |
| |
| // The v1 hub is needed for the serial console. |
| { |
| directory: "hub", |
| from: "parent", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: "fuchsia.sysinfo.SysInfo", |
| from: "#sysinfo", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| // TODO(fxb/65708) This is only needed for an ordered shutdown. |
| // Driver_manager has to shut down before shutdown_shim. |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", |
| from: "#shutdown_shim", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| // TODO(fxb/65708) This is only needed for an ordered shutdown. |
| // Console should outlive driver_manager so that logs at the end of the boot process |
| // can still be seen. |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#console", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", |
| from: "#shutdown_shim", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| "#pwrbtn-monitor", |
| "#svchost", |
| "#virtual_console", |
| ], |
| }, |
| |
| // Things shutdown_shim and power_manager need |
| { |
| protocol: [ "fuchsia.sys2.SystemController" ], |
| from: "parent", |
| to: [ |
| "#power_manager", |
| "#shutdown_shim", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.device.manager.SystemStateTransition" ], |
| from: "#driver_manager", |
| to: [ "#shutdown_shim" ], |
| |
| // TODO(fxb/65708) When this bug is complete, this can be a strong dependency. |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: [ "fuchsia.hardware.power.statecontrol.Admin" ], |
| from: "#power_manager", |
| to: [ "#shutdown_shim" ], |
| }, |
| { |
| protocol: [ "fuchsia.device.manager.Administrator" ], |
| from: "#driver_manager", |
| to: [ "#fshost" ], |
| }, |
| { |
| protocol: [ "fuchsia.device.manager.Administrator" ], |
| from: "#driver_manager", |
| to: [ "#power_manager" ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: [ "fuchsia.feedback.CrashReporter" ], |
| from: "parent", |
| to: [ "#power_manager" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.Counter", |
| "fuchsia.paver.Paver", |
| ], |
| from: "#miscsvc", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: "fuchsia.logger.Log", |
| from: "#archivist", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.logger.LogSink" ], |
| from: "#archivist", |
| to: [ |
| "#base_resolver", |
| "#console-launcher", |
| "#decompressor", |
| "#device_name_provider", |
| "#driver_manager", |
| "#fshost", |
| "#netsvc", |
| "#power_manager", |
| "#pwrbtn-monitor", |
| "#svchost", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.fshost.BlockWatcher", |
| "fuchsia.fshost.Filesystems", |
| "fuchsia.fshost.Registry", |
| ], |
| from: "#fshost", |
| to: [ |
| "#console-launcher", |
| "#netsvc", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.fshost.Admin" ], |
| from: "#fshost", |
| to: [ "#driver_manager" ], |
| dependency: "weak_for_migration", |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| as: "input", |
| to: [ "#pwrbtn-monitor" ], |
| subdir: "class/input", |
| }, |
| { |
| protocol: [ |
| "fuchsia.fshost.BlockWatcher", |
| "fuchsia.fshost.Registry", |
| ], |
| from: "#fshost", |
| to: [ "#miscsvc" ], |
| }, |
| |
| // -- Archivist offers below here -- |
| |
| // Required events |
| { |
| event: [ |
| "running", |
| "started", |
| "stopped", |
| ], |
| from: "parent", |
| to: [ "#archivist" ], |
| modes: [ "async" ], |
| }, |
| { |
| event: "capability_ready", |
| from: "parent", |
| to: [ "#archivist" ], |
| filter: { name: "diagnostics" }, |
| modes: [ "async" ], |
| }, |
| { |
| event: "capability_requested", |
| from: "parent", |
| to: [ "#archivist" ], |
| filter: { name: "fuchsia.logger.LogSink" }, |
| }, |
| |
| // Required services |
| { |
| protocol: [ |
| "fuchsia.boot.ReadOnlyLog", |
| "fuchsia.sys2.EventSource", |
| ], |
| from: "parent", |
| to: [ "#archivist" ], |
| }, |
| |
| // Weak services from appmgr and diagnostics products. |
| { |
| protocol: [ |
| "fuchsia.diagnostics.internal.DetectController", |
| "fuchsia.diagnostics.internal.LogStatsController", |
| "fuchsia.diagnostics.internal.SamplerController", |
| "fuchsia.sys.internal.ComponentEventProvider", |
| "fuchsia.sys.internal.LogConnector", |
| ], |
| from: "parent", |
| to: [ "#archivist" ], |
| dependency: "weak_for_migration", |
| }, |
| |
| // Configuration |
| { |
| directory: "boot", |
| from: "parent", |
| as: "config-data", |
| to: [ "#archivist" ], |
| rights: [ "r*" ], |
| subdir: "config/archivist", |
| }, |
| |
| // -- End Archivist offers -- |
| { |
| directory: "pkgfs-delayed", |
| from: "#fshost", |
| to: [ "#base_resolver" ], |
| |
| // Marking this offer as weak solves the following cycle: |
| // base_resolver -> fshost -> driver_manager -> power_manager -> base_resolver. |
| // TODO(fxbug.dev/64587): Make this strong once power_manager is in ZBI. |
| dependency: "weak_for_migration", |
| }, |
| { |
| resolver: "base_resolver", |
| from: "#base_resolver", |
| to: [ "#driver_manager" ], |
| }, |
| ], |
| expose: [ |
| // This handle is used by component manager to resolve packages from the |
| // base package set. |
| { |
| directory: "pkgfs-delayed", |
| from: "#fshost", |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| }, |
| { |
| directory: "config-data", |
| from: "#fshost", |
| }, |
| { |
| directory: "factory", |
| from: "#fshost", |
| }, |
| { |
| directory: "durable", |
| from: "#fshost", |
| }, |
| { |
| directory: "minfs", |
| from: "#fshost", |
| }, |
| { |
| directory: "pkgfs", |
| from: "#fshost", |
| }, |
| { |
| directory: "system", |
| from: "#fshost", |
| }, |
| { |
| directory: "blob", |
| from: "#fshost", |
| }, |
| { |
| directory: "tmp", |
| from: "#fshost", |
| }, |
| { |
| directory: "bin", |
| from: "#fshost", |
| }, |
| { |
| protocol: "fuchsia.update.verify.BlobfsVerifier", |
| from: "#fshost", |
| }, |
| { |
| protocol: "fuchsia.device.NameProvider", |
| from: "#device_name_provider", |
| }, |
| { |
| protocol: [ |
| "fuchsia.device.manager.Administrator", |
| "fuchsia.device.manager.BindDebugger", |
| "fuchsia.device.manager.DebugDumper", |
| "fuchsia.device.manager.DriverHostDevelopment", |
| "fuchsia.device.manager.SystemStateTransition", |
| "fuchsia.driver.registrar.DriverRegistrar", |
| ], |
| from: "#driver_manager", |
| }, |
| { |
| protocol: [ "fuchsia.virtualconsole.SessionManager" ], |
| from: "#virtual_console", |
| }, |
| { |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", |
| from: "#shutdown_shim", |
| }, |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#ptysvc", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.Counter", |
| "fuchsia.paver.Paver", |
| ], |
| from: "#miscsvc", |
| }, |
| { |
| protocol: "fuchsia.sysinfo.SysInfo", |
| from: "#sysinfo", |
| }, |
| { |
| protocol: [ |
| "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister", |
| "fuchsia.thermal.Controller", |
| ], |
| from: "#power_manager", |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.ArchiveAccessor", |
| "fuchsia.diagnostics.FeedbackArchiveAccessor", |
| "fuchsia.diagnostics.LegacyMetricsArchiveAccessor", |
| "fuchsia.logger.Log", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "#archivist", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.DebugBroker", |
| "fuchsia.scheduler.ProfileProvider", |
| "fuchsia.tracing.kernel.Controller", |
| "fuchsia.tracing.kernel.Reader", |
| ], |
| from: "#svchost", |
| }, |
| { |
| resolver: "base_resolver", |
| from: "#base_resolver", |
| }, |
| ], |
| environments: [ |
| { |
| name: "fshost-env", |
| extends: "realm", |
| |
| // 20 minutes |
| __stop_timeout_ms: 1200000, |
| }, |
| { |
| name: "driver_manager-env", |
| extends: "realm", |
| |
| // 1 minute |
| __stop_timeout_ms: 60000, |
| }, |
| ], |
| } |