| // Copyright 2022 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| { | |
| children: [ | |
| { | |
| name: "archivist", | |
| url: "fuchsia-boot:///archivist#meta/archivist.cm", | |
| }, | |
| { | |
| name: "device_name_provider", | |
| url: "fuchsia-boot:///device-name-provider#meta/device-name-provider.cm", | |
| }, | |
| { | |
| name: "driver_manager", | |
| url: "fuchsia-boot:///driver_manager#meta/driver_manager.cm", | |
| environment: "#driver_manager-env", | |
| }, | |
| { | |
| name: "driver_index", | |
| url: "fuchsia-boot:///driver-index#meta/driver-index.cm", | |
| on_terminate: "reboot", | |
| }, | |
| { | |
| // Exists to augment capability graph with information about when #boot-drivers should | |
| // be stopped. Most components should prefer depending on capabiliites provided by | |
| // #devfs-with-pkg over this component | |
| name: "devfs", | |
| url: "fuchsia-boot:///devfs#meta/devfs.cm", | |
| environment: "#devfs-env", | |
| }, | |
| { | |
| // Exists to augment capability graph with information about when #pkg-drivers and | |
| // #full-pkg-drivers should be stopped. Most components should prefer depending on | |
| // capabiliites provided by this component over #devfs. | |
| name: "devfs-with-pkg", | |
| url: "fuchsia-boot:///devfs#meta/devfs.cm", | |
| environment: "#devfs-env", | |
| }, | |
| { | |
| name: "flashmap", | |
| url: "fuchsia-boot:///#meta/flashmap.cm", | |
| }, | |
| { | |
| name: "fshost", | |
| url: "fuchsia-boot:///#meta/fshost.cm", | |
| environment: "#fshost-env", | |
| on_terminate: "reboot", | |
| }, | |
| { | |
| name: "console", | |
| url: "fuchsia-boot:///console#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:///console-launcher#meta/console-launcher.cm", | |
| startup: "eager", | |
| }, | |
| { | |
| name: "miscsvc", | |
| url: "fuchsia-boot:///miscsvc#meta/miscsvc.cm", | |
| }, | |
| { | |
| name: "live_usb", | |
| url: "fuchsia-boot:///live-usb#meta/live-usb.cm", | |
| startup: "eager", | |
| }, | |
| { | |
| name: "netsvc", | |
| url: "fuchsia-boot:///netsvc#meta/netsvc.cm", | |
| startup: "eager", | |
| }, | |
| { | |
| name: "ptysvc", | |
| url: "fuchsia-boot:///ptysvc#meta/ptysvc.cm", | |
| }, | |
| { | |
| name: "pwrbtn-monitor", | |
| url: "fuchsia-boot:///pwrbtn-monitor#meta/pwrbtn-monitor.cm", | |
| // pwrbtn-monitor should start eagerly - the only services it offers may never be called | |
| // on some builds, so there's no other way to start it. | |
| startup: "eager", | |
| }, | |
| { | |
| name: "shutdown_shim", | |
| url: "fuchsia-boot:///shutdown-shim#meta/shutdown-shim.cm", | |
| }, | |
| { | |
| name: "svchost", | |
| url: "fuchsia-boot:///svchost#meta/svchost.cm", | |
| // Start eager in order to register the crash handler as early as | |
| // possible. | |
| startup: "eager", | |
| }, | |
| { | |
| name: "sysinfo", | |
| url: "fuchsia-boot:///sysinfo#meta/sysinfo.cm", | |
| }, | |
| { | |
| name: "cr50_agent", | |
| url: "fuchsia-boot:///#meta/cr50_agent.cm", | |
| }, | |
| { | |
| name: "vboot-fwparam", | |
| url: "fuchsia-boot:///#meta/vboot-fwparam.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:///power-manager#meta/power-manager.cm", | |
| }, | |
| { | |
| name: "virtual_console", | |
| url: "fuchsia-boot:///virtual-console#meta/virtual-console.cm", | |
| }, | |
| // TODO(fxb/98535): Remove need for separate full_resolver component here. | |
| // Full resolver clone to be used by the full-pkg-drivers collection | |
| { | |
| name: "full_resolver", | |
| url: "fuchsia-pkg://fuchsia.com/full-resolver#meta/full-resolver.cm", | |
| environment: "#base-resolver-env", | |
| }, | |
| { | |
| name: "pkg-cache", | |
| url: "fuchsia-pkg://fuchsia.com/pkg-cache#meta/pkg-cache.cm", | |
| environment: "#base-resolver-env", | |
| }, | |
| ], | |
| collections: [ | |
| { | |
| name: "driver-hosts", | |
| environment: "#driver-host-env", | |
| durability: "single_run", | |
| }, | |
| { | |
| name: "boot-drivers", | |
| environment: "#boot-driver-env", | |
| durability: "single_run", | |
| allowed_offers: "static_and_dynamic", | |
| allow_long_names: true, | |
| }, | |
| { | |
| name: "pkg-drivers", | |
| environment: "#pkg-driver-env", | |
| durability: "single_run", | |
| allowed_offers: "static_and_dynamic", | |
| allow_long_names: true, | |
| }, | |
| { | |
| name: "full-pkg-drivers", | |
| environment: "#full-pkg-driver-env", | |
| durability: "single_run", | |
| allowed_offers: "static_and_dynamic", | |
| allow_long_names: true, | |
| }, | |
| ], | |
| offer: [ | |
| // Disable the required offer for Archivist | |
| { | |
| protocol: [ | |
| "fuchsia.inspect.InspectSink", | |
| "fuchsia.logger.LogSink", | |
| ], | |
| from: "void", | |
| to: "#archivist", | |
| availability: "optional", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.boot.ReadOnlyLog", | |
| "fuchsia.boot.WriteOnlyLog", | |
| ], | |
| from: "parent", | |
| to: "#virtual_console", | |
| }, | |
| { | |
| protocol: "fuchsia.tracing.provider.Registry", | |
| from: "parent", | |
| to: [ | |
| "#archivist", | |
| "#boot-drivers", | |
| "#console-launcher", | |
| "#driver-hosts", | |
| "#driver_manager", | |
| "#fshost", | |
| "#full-pkg-drivers", | |
| "#netsvc", | |
| "#pkg-cache", | |
| "#pkg-drivers", | |
| "#power_manager", | |
| "#virtual_console", | |
| ], | |
| availability: "optional", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.boot.FactoryItems", | |
| "fuchsia.boot.Items", | |
| "fuchsia.boot.ReadOnlyLog", | |
| "fuchsia.boot.RootResource", | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.exception.Handler", | |
| "fuchsia.kernel.RootJob", | |
| "fuchsia.kernel.RootJobForInspect", | |
| "fuchsia.kernel.Stats", | |
| "fuchsia.metrics.MetricEventLoggerFactory", | |
| "fuchsia.pkg.RepositoryManager", | |
| "fuchsia.pkg.rewrite.Engine", | |
| "fuchsia.process.Launcher", | |
| ], | |
| from: "parent", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.dash.Launcher", | |
| "fuchsia.tracing.controller.Controller", | |
| ], | |
| from: "parent", | |
| to: [ "#console-launcher" ], | |
| availability: "optional", | |
| }, | |
| // Allow shell tools launched from the console to use the root Realm | |
| // querying protocols. | |
| { | |
| protocol: [ | |
| "fuchsia.sys2.LifecycleController.root", | |
| "fuchsia.sys2.RealmExplorer.root", | |
| "fuchsia.sys2.RealmQuery.root", | |
| "fuchsia.sys2.RouteValidator.root", | |
| ], | |
| from: "parent", | |
| to: "#console-launcher", | |
| }, | |
| { | |
| // Allow launching shell tools from the console, | |
| // including from universe packages. | |
| protocol: [ | |
| "fuchsia.pkg.PackageResolver", | |
| "fuchsia.process.Resolver", | |
| ], | |
| from: "parent", | |
| to: "#console-launcher", | |
| }, | |
| { | |
| // Allow the console to run `snapshot`. | |
| protocol: "fuchsia.feedback.DataProvider", | |
| from: "parent", | |
| to: "#console-launcher", | |
| }, | |
| { | |
| // Allow networking from programs running in the console. | |
| protocol: [ | |
| "fuchsia.net.name.Lookup", | |
| "fuchsia.posix.socket.Provider", | |
| ], | |
| from: "parent", | |
| to: "#console-launcher", | |
| }, | |
| { | |
| // Allow launching / managing guests from the console. | |
| protocol: [ | |
| "fuchsia.virtualization.DebianGuestManager", | |
| "fuchsia.virtualization.LinuxManager", | |
| "fuchsia.virtualization.TerminaGuestManager", | |
| "fuchsia.virtualization.ZirconGuestManager", | |
| ], | |
| from: "parent", | |
| to: "#console-launcher", | |
| // Virtualization is not present in all configurations. | |
| // See: fxbug.dev/103301 | |
| availability: "optional", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.ArchiveAccessor", | |
| "fuchsia.diagnostics.FeedbackArchiveAccessor", | |
| "fuchsia.diagnostics.LegacyMetricsArchiveAccessor", | |
| ], | |
| from: "#archivist", | |
| to: "#console-launcher", | |
| }, | |
| { | |
| protocol: "fuchsia.pkg.PackageResolver", | |
| from: "#base_resolver", | |
| as: "fuchsia.pkg.PackageResolver-base", | |
| to: [ | |
| "#driver_index", | |
| "#driver_manager", | |
| ], | |
| // base_resolver depends on fshost for blobfs and fshost depends transitively on | |
| // driver_index and driver_manager, but driver_index and driver_manager don't need base | |
| // packages to provide fshost's (transitive) dependencies. | |
| dependency: "weak", | |
| }, | |
| { | |
| // This is only used when the #driver_index |enable_ephemeral_drivers| config | |
| // is set, which enables loading drivers ephemerally. This is intended for | |
| // eng builds only and is set through product assembly. | |
| protocol: "fuchsia.pkg.PackageResolver", | |
| from: "parent", | |
| as: "fuchsia.pkg.PackageResolver-full", | |
| to: "#driver_index", | |
| }, | |
| { | |
| directory: "boot", | |
| from: "parent", | |
| to: [ | |
| "#console-launcher", | |
| "#driver_index", | |
| "#driver_manager", | |
| "#fshost", | |
| "#miscsvc", | |
| "#netsvc", | |
| ], | |
| rights: [ "rx*" ], | |
| }, | |
| { | |
| directory: "boot", | |
| from: "parent", | |
| as: "config-profiles", | |
| to: "#svchost", | |
| rights: [ "r*" ], | |
| subdir: "config/profiles", | |
| }, | |
| { | |
| directory: "boot", | |
| from: "parent", | |
| as: "boot-data", | |
| to: [ "#virtual_console" ], | |
| rights: [ "r*" ], | |
| subdir: "data", | |
| }, | |
| { | |
| directory: "boot", | |
| from: "parent", | |
| as: "config", | |
| to: [ "#power_manager" ], | |
| rights: [ "r*" ], | |
| subdir: "config/power_manager", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.boot.Items", | |
| "fuchsia.boot.RootResource", | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.kernel.MexecResource", | |
| "fuchsia.kernel.PowerResource", | |
| "fuchsia.kernel.RootJob", | |
| "fuchsia.process.Launcher", | |
| ], | |
| from: "parent", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| protocol: "fuchsia.pkg.PackageResolver", | |
| from: "parent", | |
| as: "fuchsia.pkg.PackageResolver-full", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| protocol: "fuchsia.component.Realm", | |
| from: "framework", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.driver.development.DriverIndex", | |
| "fuchsia.driver.index.DriverIndex", | |
| "fuchsia.driver.registrar.DriverRegistrar", | |
| ], | |
| from: "#driver_index", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| // The dependency relationship between power-manager and | |
| // driver-manager is inverted. In other words, driver-manager | |
| // depends on power-manager for its policy, but the relationship is | |
| // expressed in reverse in the driver framework using weak | |
| // dependencies. This "protocol" is a phantom used to ensure that | |
| // driver-manager is shut down before power-manager is. | |
| // | |
| // TODO(https://fxbug.dev/119962): Change the APIs used here so that | |
| // driver-manager pulls policy from power-manager, rather | |
| // power-manager pushing it to driver-manager. | |
| protocol: [ "power-manager-outlives-driver-manager" ], | |
| from: "#power_manager", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| protocol: [ "fuchsia.boot.WriteOnlyLog" ], | |
| from: "parent", | |
| to: "#driver-hosts", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Items", | |
| "fuchsia.boot.RootResource", | |
| "fuchsia.kernel.IoportResource", | |
| "fuchsia.kernel.IrqResource", | |
| "fuchsia.kernel.MmioResource", | |
| "fuchsia.kernel.SmcResource", | |
| ], | |
| from: "parent", | |
| to: "#boot-drivers", | |
| }, | |
| { | |
| protocol: "fuchsia.kernel.InfoResource", | |
| from: "parent", | |
| to: [ | |
| "#boot-drivers", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| }, | |
| { | |
| protocol: "fuchsia.boot.Arguments", | |
| from: "parent", | |
| to: [ | |
| "#boot-drivers", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.kernel.DebugResource", | |
| ], | |
| from: "parent", | |
| to: "#console", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.boot.Items", | |
| "fuchsia.feedback.CrashReporter", | |
| "fuchsia.process.Launcher", | |
| ], | |
| from: "parent", | |
| to: "#fshost", | |
| }, | |
| { | |
| protocol: [ "fuchsia.memorypressure.Provider" ], | |
| from: "parent", | |
| to: "#fshost", | |
| availability: "optional", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.pkg.rewrite.Engine", | |
| ], | |
| from: "parent", | |
| to: "#live_usb", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.Arguments", | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.process.Launcher", | |
| ], | |
| from: "parent", | |
| to: "#miscsvc", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.RootResource", | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.exception.Handler", | |
| "fuchsia.kernel.RootJob", | |
| ], | |
| 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.metrics.MetricEventLoggerFactory" ], | |
| from: "parent", | |
| to: [ | |
| "#fshost", | |
| "#power_manager", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.kernel.CpuResource", | |
| ], | |
| from: "parent", | |
| to: "#power_manager", | |
| }, | |
| { | |
| protocol: [ "fuchsia.kernel.VmexResource" ], | |
| from: "parent", | |
| to: "#fshost", | |
| }, | |
| { | |
| protocol: [ "fuchsia.scheduler.ProfileProvider" ], | |
| from: "#svchost", | |
| to: [ | |
| "#boot-drivers", | |
| "#fshost", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| }, | |
| { | |
| 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.driver.development.DriverDevelopment", | |
| "fuchsia.hardware.usb.DeviceWatcher", | |
| ], | |
| from: "#driver_manager", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.device.composite.DeprecatedCompositeCreator", | |
| "fuchsia.driver.framework.CompositeNodeManager", | |
| ], | |
| from: "#driver_manager", | |
| to: [ | |
| "#boot-drivers", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.device.fs.lifecycle.Lifecycle" ], | |
| from: "#driver_manager", | |
| to: [ "#devfs" ], | |
| }, | |
| { | |
| protocol: "fuchsia.device.fs.with.pkg.lifecycle.Lifecycle", | |
| from: "#driver_manager", | |
| as: "fuchsia.device.fs.lifecycle.Lifecycle", | |
| to: [ "#devfs-with-pkg" ], | |
| }, | |
| { | |
| directory: "dev", | |
| from: "#driver_manager", | |
| to: [ "#devfs" ], | |
| }, | |
| { | |
| directory: "dev-topological", | |
| from: "#devfs", | |
| as: "dev", | |
| to: [ "#devfs-with-pkg" ], | |
| }, | |
| // These protocols are not actually used but exist to increase the lifetime | |
| // of components. The capabilities are named after their place in the topology. | |
| // We cannot use a single service due to the lack of service merging. | |
| { | |
| service: [ "bootstrap.driver-hosts" ], | |
| from: "#driver-hosts", | |
| to: [ | |
| "#devfs", | |
| "#devfs-with-pkg", | |
| ], | |
| }, | |
| { | |
| service: [ "bootstrap.boot-drivers" ], | |
| from: "#boot-drivers", | |
| to: [ "#devfs" ], | |
| }, | |
| { | |
| service: [ "bootstrap.pkg-drivers" ], | |
| from: "#pkg-drivers", | |
| to: [ "#devfs-with-pkg" ], | |
| }, | |
| { | |
| service: [ "bootstrap.full-pkg-drivers" ], | |
| from: "#full-pkg-drivers", | |
| to: [ "#devfs-with-pkg" ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.scheduler.ProfileProvider" ], | |
| from: "#svchost", | |
| to: "#driver_manager", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.kernel.DebugBroker", | |
| "fuchsia.scheduler.ProfileProvider", | |
| ], | |
| from: "#svchost", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.sysmem.Allocator", | |
| "fuchsia.sysmem2.Allocator", | |
| ], | |
| from: "#miscsvc", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.sysmem.Allocator" ], | |
| from: "#miscsvc", | |
| to: [ | |
| "#boot-drivers", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| // This must be weak because miscsvc needs sysmem from devfs, which creates | |
| // a cycle. sysmem can be made into a non-driver to fix this. | |
| dependency: "weak_for_migration", | |
| }, | |
| { | |
| protocol: [ "fuchsia.sysmem.Allocator" ], | |
| from: "#miscsvc", | |
| to: "#virtual_console", | |
| }, | |
| { | |
| directory: "dev-topological", | |
| from: "#devfs", | |
| to: [ "#fshost" ], | |
| }, | |
| { | |
| directory: "dev-topological", | |
| from: "#devfs-with-pkg", | |
| to: [ | |
| "#console-launcher", | |
| "#flashmap", | |
| "#miscsvc", | |
| "#sysinfo", | |
| "#vboot-fwparam", | |
| ], | |
| }, | |
| { | |
| directory: "dev-topological", | |
| from: "#devfs-with-pkg", | |
| to: "#power_manager", | |
| dependency: "weak", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "dev-class-network", | |
| to: [ | |
| "#device_name_provider", | |
| "#netsvc", | |
| ], | |
| subdir: "network", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs", | |
| as: "dev-class-block", | |
| to: "#live_usb", | |
| subdir: "block", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "dev-class-tpm", | |
| to: "#cr50_agent", | |
| subdir: "tpm", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "input-report", | |
| to: "#virtual_console", | |
| subdir: "input-report", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "display-coordinator", | |
| to: "#virtual_console", | |
| subdir: "display-coordinator", | |
| }, | |
| { | |
| directory: [ "tmp" ], | |
| from: "#fshost", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| dependency: "weak_for_migration", | |
| }, | |
| { | |
| directory: [ | |
| "pkgfs", | |
| "root-ssl-certificates", | |
| "system", | |
| ], | |
| from: "#pkg-cache", | |
| to: "#console-launcher", | |
| dependency: "weak_for_migration", | |
| }, | |
| { | |
| directory: "shell-commands-bin", | |
| from: "#base_resolver", | |
| as: "bin", | |
| to: "#console-launcher", | |
| dependency: "weak_for_migration", | |
| }, | |
| { | |
| directory: [ | |
| "blob", | |
| "data", | |
| ], | |
| from: "#fshost", | |
| to: [ "#console-launcher" ], | |
| dependency: "weak_for_migration", | |
| }, | |
| // 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", | |
| ], | |
| }, | |
| { | |
| protocol: "fuchsia.hardware.pty.Device", | |
| from: "#ptysvc", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| "#virtual_console", | |
| ], | |
| }, | |
| { | |
| 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: "#shutdown_shim", | |
| to: [ | |
| "#boot-drivers", | |
| "#driver-hosts", | |
| "#driver_manager", | |
| "#full-pkg-drivers", | |
| "#pkg-drivers", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.hardware.power.statecontrol.Admin" ], | |
| from: "#power_manager", | |
| to: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: [ "fuchsia.device.manager.Administrator" ], | |
| from: "#driver_manager", | |
| to: "#fshost", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.feedback.CrashReporter", | |
| "fuchsia.kernel.Stats", | |
| "fuchsia.ui.activity.Provider", | |
| ], | |
| from: "parent", | |
| to: "#power_manager", | |
| }, | |
| { | |
| protocol: "fuchsia.settings.Input", | |
| from: "parent", | |
| to: "#power_manager", | |
| availability: "optional", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.kernel.Counter", | |
| "fuchsia.paver.Paver", | |
| ], | |
| from: "#miscsvc", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.paver.Paver" ], | |
| from: "#miscsvc", | |
| to: "#live_usb", | |
| }, | |
| { | |
| protocol: "fuchsia.logger.Log", | |
| from: "#archivist", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.inspect.InspectSink", | |
| "fuchsia.logger.LogSink", | |
| ], | |
| from: "#archivist", | |
| to: [ | |
| "#base_resolver", | |
| "#boot-drivers", | |
| "#console", | |
| "#console-launcher", | |
| "#cr50_agent", | |
| "#devfs", | |
| "#devfs-with-pkg", | |
| "#device_name_provider", | |
| "#driver-hosts", | |
| "#driver_index", | |
| "#driver_manager", | |
| "#flashmap", | |
| "#fshost", | |
| "#full-pkg-drivers", | |
| "#live_usb", | |
| "#miscsvc", | |
| "#netsvc", | |
| "#pkg-drivers", | |
| "#power_manager", | |
| "#ptysvc", | |
| "#pwrbtn-monitor", | |
| "#shutdown_shim", | |
| "#svchost", | |
| "#sysinfo", | |
| "#vboot-fwparam", | |
| "#virtual_console", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.vboot.FirmwareParam" ], | |
| from: "#vboot-fwparam", | |
| to: [ | |
| "#console-launcher", | |
| "#miscsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.kernel.RootJob" ], | |
| from: "parent", | |
| to: "#pwrbtn-monitor", | |
| }, | |
| { | |
| protocol: [ "fuchsia.power.button.Monitor" ], | |
| from: "#pwrbtn-monitor", | |
| to: "#cr50_agent", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.fshost.Admin", | |
| "fuchsia.fshost.BlockWatcher", | |
| ], | |
| from: "#fshost", | |
| to: [ | |
| "#console-launcher", | |
| "#netsvc", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.tpm.cr50.Cr50" ], | |
| from: "#cr50_agent", | |
| to: [ | |
| "#console-launcher", | |
| "#miscsvc", | |
| ], | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "input", | |
| to: "#pwrbtn-monitor", | |
| subdir: "input", | |
| }, | |
| { | |
| protocol: [ "fuchsia.fshost.BlockWatcher" ], | |
| from: "#fshost", | |
| to: "#miscsvc", | |
| }, | |
| { | |
| protocol: "fuchsia.nand.flashmap.Manager", | |
| from: "#flashmap", | |
| to: [ | |
| "#miscsvc", | |
| "#vboot-fwparam", | |
| ], | |
| }, | |
| { | |
| protocol: [ "fuchsia.fshost.BlockWatcher" ], | |
| from: "#fshost", | |
| to: "#live_usb", | |
| }, | |
| // -- Archivist offers below here -- | |
| // Required events | |
| { | |
| event_stream: "stopped", | |
| from: "parent", | |
| to: "#archivist", | |
| }, | |
| { | |
| event_stream: "capability_requested", | |
| from: "parent", | |
| to: "#archivist", | |
| }, | |
| { | |
| event_stream: "directory_ready", | |
| from: "parent", | |
| to: "#archivist", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.boot.ReadOnlyLog", | |
| "fuchsia.boot.WriteOnlyLog", | |
| "fuchsia.component.KcounterBinder", | |
| "fuchsia.component.PersistenceBinder", | |
| "fuchsia.component.SamplerBinder", | |
| ], | |
| from: "parent", | |
| to: "#archivist", | |
| // Weak to resolve dependency cycles | |
| dependency: "weak", | |
| }, | |
| { | |
| protocol: [ "fuchsia.component.DetectBinder" ], | |
| from: "parent", | |
| to: "#archivist", | |
| dependency: "weak", | |
| availability: "same_as_target", | |
| }, | |
| // Optional services from appmgr | |
| { | |
| protocol: [ | |
| "fuchsia.sys.internal.ComponentEventProvider", | |
| "fuchsia.sys.internal.LogConnector", | |
| ], | |
| from: "parent", | |
| to: "#archivist", | |
| dependency: "weak_for_migration", | |
| availability: "optional", | |
| }, | |
| // Configuration | |
| { | |
| directory: "boot", | |
| from: "parent", | |
| as: "config-data", | |
| to: "#archivist", | |
| rights: [ "r*" ], | |
| subdir: "config/archivist", | |
| }, | |
| // -- End Archivist offers -- | |
| { | |
| protocol: "fuchsia.boot.Arguments", | |
| from: "parent", | |
| to: "#base_resolver", | |
| }, | |
| { | |
| directory: "blob-exec", | |
| from: "#fshost", | |
| to: [ | |
| "#base_resolver", | |
| "#pkg-cache", | |
| ], | |
| }, | |
| { | |
| protocol: "fuchsia.boot.Arguments", | |
| from: "parent", | |
| to: "#pkg-cache", | |
| }, | |
| { | |
| protocol: "fuchsia.logger.LogSink", | |
| from: "#archivist", | |
| to: "#pkg-cache", | |
| }, | |
| { | |
| protocol: "fuchsia.inspect.InspectSink", | |
| from: "#archivist", | |
| to: "#pkg-cache", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.metrics.MetricEventLoggerFactory", | |
| "fuchsia.update.CommitStatusProvider", | |
| ], | |
| from: "parent", | |
| to: "#pkg-cache", | |
| dependency: "weak", | |
| }, | |
| // Full resolver dependencies | |
| { | |
| protocol: "fuchsia.pkg.PackageResolver", | |
| from: "parent", | |
| to: "#full_resolver", | |
| }, | |
| { | |
| protocol: "fuchsia.logger.LogSink", | |
| from: "#archivist", | |
| to: "#full_resolver", | |
| }, | |
| { | |
| protocol: "fuchsia.inspect.InspectSink", | |
| from: "#archivist", | |
| to: "#full_resolver", | |
| }, | |
| ], | |
| expose: [ | |
| { | |
| directory: [ | |
| "build-info", | |
| "config-data", | |
| "pkgfs", | |
| "root-ssl-certificates", | |
| "system", | |
| ], | |
| from: "#pkg-cache", | |
| }, | |
| { | |
| directory: "shell-commands-bin", | |
| from: "#base_resolver", | |
| as: "bin", | |
| }, | |
| { | |
| directory: [ | |
| "dev-builtin", | |
| "dev-class", | |
| "dev-topological", | |
| ], | |
| from: "#devfs-with-pkg", | |
| }, | |
| { | |
| directory: [ | |
| "blob", | |
| "data", | |
| "factory", | |
| "tmp", | |
| ], | |
| from: "#fshost", | |
| }, | |
| { | |
| protocol: "fuchsia.pkg.PackageResolver", | |
| from: "#base_resolver", | |
| as: "fuchsia.pkg.PackageResolver-base", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.fshost.Admin", | |
| "fuchsia.fshost.BlockWatcher", | |
| ], | |
| from: "#fshost", | |
| }, | |
| { | |
| protocol: "fuchsia.update.verify.BlobfsVerifier", | |
| from: "#fshost", | |
| }, | |
| { | |
| protocol: "fuchsia.fxfs.Volumes", | |
| from: "#fshost", | |
| }, | |
| { | |
| protocol: "fuchsia.device.NameProvider", | |
| from: "#device_name_provider", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.driver.development.DriverDevelopment", | |
| "fuchsia.hardware.usb.DeviceWatcher", | |
| ], | |
| from: "#driver_manager", | |
| }, | |
| { | |
| protocol: "fuchsia.driver.registrar.DriverRegistrar", | |
| from: "#driver_index", | |
| }, | |
| { | |
| protocol: [ "fuchsia.vboot.FirmwareParam" ], | |
| from: "#vboot-fwparam", | |
| }, | |
| { | |
| protocol: [ "fuchsia.virtualconsole.SessionManager" ], | |
| from: "#virtual_console", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.tpm.cr50.Cr50", | |
| "fuchsia.tpm.cr50.PinWeaver", | |
| ], | |
| from: "#cr50_agent", | |
| }, | |
| { | |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", | |
| from: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: "fuchsia.hardware.pty.Device", | |
| from: "#ptysvc", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.kernel.Counter", | |
| "fuchsia.paver.Paver", | |
| "fuchsia.sysmem.Allocator", | |
| "fuchsia.sysmem2.Allocator", | |
| ], | |
| from: "#miscsvc", | |
| }, | |
| { | |
| protocol: "fuchsia.power.button.Monitor", | |
| from: "#pwrbtn-monitor", | |
| }, | |
| { | |
| protocol: "fuchsia.sysinfo.SysInfo", | |
| from: "#sysinfo", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister", | |
| "fuchsia.power.clientlevel.Connector", | |
| "fuchsia.power.profile.Watcher", | |
| "fuchsia.power.systemmode.ClientConfigurator", | |
| "fuchsia.power.systemmode.Requester", | |
| "fuchsia.thermal.ClientStateConnector", | |
| ], | |
| from: "#power_manager", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.ArchiveAccessor", | |
| "fuchsia.diagnostics.FeedbackArchiveAccessor", | |
| "fuchsia.diagnostics.LegacyMetricsArchiveAccessor", | |
| "fuchsia.diagnostics.LoWPANArchiveAccessor", | |
| "fuchsia.inspect.InspectSink", | |
| "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", | |
| }, | |
| { | |
| protocol: "fuchsia.nand.flashmap.Manager", | |
| from: "#flashmap", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.pkg.PackageCache", | |
| "fuchsia.pkg.RetainedPackages", | |
| "fuchsia.space.Manager", | |
| ], | |
| from: "#pkg-cache", | |
| }, | |
| ], | |
| environments: [ | |
| { | |
| name: "base-resolver-env", | |
| extends: "realm", | |
| resolvers: [ | |
| { | |
| resolver: "base_resolver", | |
| from: "#base_resolver", | |
| scheme: "fuchsia-pkg", | |
| }, | |
| ], | |
| }, | |
| { | |
| name: "fshost-env", | |
| extends: "realm", | |
| // 20 minutes | |
| __stop_timeout_ms: 1200000, | |
| }, | |
| { | |
| name: "driver_manager-env", | |
| extends: "realm", | |
| // 1 minute | |
| __stop_timeout_ms: 60000, | |
| }, | |
| { | |
| name: "devfs-env", | |
| extends: "realm", | |
| // 1 minute | |
| __stop_timeout_ms: 60000, | |
| }, | |
| { | |
| name: "driver-host-env", | |
| extends: "realm", | |
| // 2 seconds | |
| __stop_timeout_ms: 2000, | |
| }, | |
| { | |
| name: "boot-driver-env", | |
| extends: "none", | |
| runners: [ | |
| { | |
| runner: "driver", | |
| from: "#driver_manager", | |
| }, | |
| ], | |
| resolvers: [ | |
| { | |
| resolver: "boot_resolver", | |
| from: "parent", | |
| scheme: "fuchsia-boot", | |
| }, | |
| ], | |
| // 1 second | |
| __stop_timeout_ms: 1000, | |
| }, | |
| { | |
| name: "pkg-driver-env", | |
| extends: "none", | |
| runners: [ | |
| { | |
| runner: "driver", | |
| from: "#driver_manager", | |
| }, | |
| ], | |
| resolvers: [ | |
| { | |
| resolver: "boot_resolver", | |
| from: "parent", | |
| scheme: "fuchsia-boot", | |
| }, | |
| { | |
| resolver: "base_resolver", | |
| from: "#base_resolver", | |
| scheme: "fuchsia-pkg", | |
| }, | |
| ], | |
| // 1 second | |
| __stop_timeout_ms: 1000, | |
| }, | |
| { | |
| name: "full-pkg-driver-env", | |
| extends: "none", | |
| runners: [ | |
| { | |
| runner: "driver", | |
| from: "#driver_manager", | |
| }, | |
| ], | |
| resolvers: [ | |
| { | |
| resolver: "boot_resolver", | |
| from: "parent", | |
| scheme: "fuchsia-boot", | |
| }, | |
| { | |
| resolver: "full-resolver", | |
| from: "#full_resolver", | |
| scheme: "fuchsia-pkg", | |
| }, | |
| ], | |
| // 1 second | |
| __stop_timeout_ms: 1000, | |
| }, | |
| ], | |
| } |