| // 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: "bootstrap", |
| url: "fuchsia-boot:///bootstrap#meta/bootstrap.cm", |
| startup: "eager", |
| environment: "#elf-env", |
| }, |
| { |
| name: "startup", |
| url: "fuchsia-boot:///startup#meta/startup.cm", |
| startup: "eager", |
| environment: "#elf-env", |
| }, |
| { |
| name: "core", |
| url: "fuchsia-pkg://fuchsia.com/core#meta/core.cm", |
| environment: "#core-env", |
| on_terminate: "reboot", |
| }, |
| { |
| name: "elf_runner", |
| url: "fuchsia-builtin://#elf_runner.cm", |
| }, |
| { |
| name: "config", |
| url: "fuchsia-boot:///config#meta/config.cm", |
| }, |
| ], |
| offer: [ |
| { |
| from: "#config", |
| to: "#bootstrap", |
| config: [ |
| "fuchsia.diagnostics.AllowSerialLogs", |
| "fuchsia.diagnostics.BindServices", |
| "fuchsia.diagnostics.DenySerialLogs", |
| "fuchsia.diagnostics.ExceptionHandlerAvailable", |
| "fuchsia.diagnostics.LogsMaxCachedOriginalBytes", |
| "fuchsia.diagnostics.MaximumConcurrentSnapshotsPerReader", |
| "fuchsia.diagnostics.NumThreads", |
| "fuchsia.driver.BaseDrivers", |
| "fuchsia.driver.BindEager", |
| "fuchsia.driver.BootDrivers", |
| "fuchsia.driver.DelayFallbackUntilBaseDriversIndexed", |
| "fuchsia.driver.DisabledDrivers", |
| "fuchsia.driver.DriverLoadFuzzerMaxDelayMs", |
| "fuchsia.driver.EnableDriverLoadFuzzer", |
| "fuchsia.driver.EnableEphemeralDrivers", |
| "fuchsia.driver.manager.DelayFallbackUntilBaseDriversLoaded", |
| "fuchsia.driver.manager.DriverHostCrashPolicy", |
| "fuchsia.driver.manager.EnableTestShutdownDelays", |
| "fuchsia.driver.manager.RootDriver", |
| "fuchsia.driver.UseHardwareIommu", |
| "fuchsia.power.SuspendEnabled", |
| "fuchsia.usb.PeripheralConfig.Functions", |
| ], |
| }, |
| { |
| from: "#config", |
| to: "#core", |
| config: [ |
| "fuchsia.http-client.StopOnIdleTimeoutMillis", |
| "fuchsia.memory.CaptureOnPressureChange", |
| "fuchsia.memory.CriticalCaptureDelay", |
| "fuchsia.memory.ImminentOomCaptureDelay", |
| "fuchsia.memory.NormalCaptureDelay", |
| "fuchsia.memory.WarningCaptureDelay", |
| "fuchsia.power.SuspendEnabled", |
| "fuchsia.session.AutoLaunch", |
| "fuchsia.session.SessionUrl", |
| "fuchsia.wlan.RecoveryEnabled", |
| "fuchsia.wlan.RecoveryProfile", |
| ], |
| availability: "same_as_target", |
| }, |
| { |
| protocol: "fuchsia.process.Launcher", |
| from: "parent", |
| to: "#elf_runner", |
| }, |
| { |
| protocol: "fuchsia.component.Binder", |
| from: "#core", |
| as: "fuchsia.component.CoreBinder", |
| to: "#startup", |
| }, |
| { |
| protocol: [ |
| "fuchsia.inspect.InspectSink", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "#bootstrap", |
| to: "#startup", |
| }, |
| |
| // The LogSink capability comes from an ELF component, but running ELF components |
| // requires an ELF runner. Therefore the ELF runner can't get the LogSink capability. |
| { |
| protocol: "fuchsia.logger.LogSink", |
| from: "void", |
| to: "#elf_runner", |
| availability: "optional", |
| }, |
| |
| // We route these from void to bootstrap to satisfy the requirement |
| // that the protocols routed everywhere. Bootstrap is exposing them itself. |
| { |
| protocol: [ |
| "fuchsia.inspect.InspectSink", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "void", |
| to: [ |
| "#bootstrap", |
| "#config", |
| ], |
| availability: "optional", |
| }, |
| |
| // Capabilities routed from "parent" at the root are either provided by |
| // bootsvc through component_manager's namespace or by component_manager |
| // itself as a builtin service |
| { |
| directory: "boot", |
| from: "parent", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.FactoryItems", |
| "fuchsia.boot.Items", |
| "fuchsia.boot.ReadOnlyLog", |
| "fuchsia.boot.RootResource", |
| "fuchsia.boot.SvcStashProvider", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.kernel.CpuResource", |
| "fuchsia.kernel.DebuglogResource", |
| "fuchsia.kernel.DebugResource", |
| "fuchsia.kernel.EnergyInfoResource", |
| "fuchsia.kernel.FramebufferResource", |
| "fuchsia.kernel.HypervisorResource", |
| "fuchsia.kernel.InfoResource", |
| "fuchsia.kernel.IommuResource", |
| "fuchsia.kernel.IoportResource", |
| "fuchsia.kernel.IrqResource", |
| "fuchsia.kernel.MexecResource", |
| "fuchsia.kernel.MmioResource", |
| "fuchsia.kernel.MsiResource", |
| "fuchsia.kernel.PowerResource", |
| "fuchsia.kernel.ProfileResource", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.kernel.RootJobForInspect", |
| "fuchsia.kernel.SmcResource", |
| "fuchsia.kernel.Stats", |
| "fuchsia.kernel.VmexResource", |
| "fuchsia.process.Launcher", |
| "fuchsia.sys2.CrashIntrospect", |
| ], |
| from: "parent", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| event_stream: [ |
| "capability_requested", |
| "debug_started", |
| "destroyed", |
| "discovered", |
| "started", |
| "stopped", |
| ], |
| from: "parent", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.net.name.Lookup", |
| "fuchsia.posix.socket.Provider", |
| ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| }, |
| { |
| protocol: [ "fuchsia.time.Maintenance" ], |
| from: "parent", |
| to: "#core", |
| }, |
| { |
| protocol: [ "fuchsia.memory.attribution.Provider" ], |
| from: "#elf_runner", |
| to: "#core", |
| }, |
| { |
| protocol: [ |
| "fuchsia.component.resolution.Resolver", |
| "fuchsia.sys2.SystemController", |
| ], |
| from: "parent", |
| to: "#bootstrap", |
| }, |
| |
| // ...and the rest of these are capabilities provided by components for each other |
| { |
| directory: [ |
| "bin", |
| "blob", |
| "build-info", |
| "config-data", |
| "data", |
| "dev-builtin", |
| "dev-class", |
| "dev-topological", |
| "factory", |
| "pkgfs", |
| "root-ssl-certificates", |
| "system", |
| "tmp", |
| ], |
| from: "#bootstrap", |
| to: "#core", |
| }, |
| |
| // Non-zircon services for bootstrap |
| { |
| protocol: [ |
| "fuchsia.device.NameProvider", |
| "fuchsia.diagnostics.ArchiveAccessor", |
| "fuchsia.diagnostics.FeedbackArchiveAccessor", |
| "fuchsia.diagnostics.host.ArchiveAccessor", |
| "fuchsia.diagnostics.LegacyMetricsArchiveAccessor", |
| "fuchsia.diagnostics.LogSettings", |
| "fuchsia.diagnostics.LoWPANArchiveAccessor", |
| "fuchsia.driver.development.Manager", |
| "fuchsia.driver.registrar.DriverRegistrar", |
| "fuchsia.fshost.Admin", |
| "fuchsia.fshost.BlockWatcher", |
| "fuchsia.hardware.power.statecontrol.Admin", |
| "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister", |
| "fuchsia.inspect.InspectSink", |
| "fuchsia.logger.Log", |
| "fuchsia.logger.LogSink", |
| "fuchsia.paver.Paver", |
| "fuchsia.pkg.PackageCache", |
| "fuchsia.pkg.PackageResolver-base", |
| "fuchsia.pkg.RetainedPackages", |
| "fuchsia.power.button.Monitor", |
| "fuchsia.power.clientlevel.Connector", |
| "fuchsia.power.profile.Watcher", |
| "fuchsia.power.systemmode.ClientConfigurator", |
| "fuchsia.power.systemmode.Requester", |
| "fuchsia.scheduler.deprecated.ProfileProvider", |
| "fuchsia.scheduler.RoleManager", |
| "fuchsia.space.Manager", |
| "fuchsia.sysinfo.SysInfo", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.sysmem2.Allocator", |
| "fuchsia.thermal.ClientStateConnector", |
| "fuchsia.update.verify.BlobfsVerifier", |
| ], |
| from: "#bootstrap", |
| to: "#core", |
| }, |
| { |
| protocol: [ |
| "fuchsia.tpm.cr50.Cr50", |
| "fuchsia.virtualconsole.SessionManager", |
| ], |
| from: "#bootstrap", |
| to: "#core", |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.hardware.pty.Device", |
| "fuchsia.kernel.Counter", |
| "fuchsia.kernel.DebugBroker", |
| "fuchsia.tracing.kernel.Controller", |
| "fuchsia.tracing.kernel.Reader", |
| ], |
| from: "#bootstrap", |
| to: "#core", |
| availability: "same_as_target", |
| }, |
| |
| // Non-zircon services for archivist, pwrbtn-monitor, and console. |
| { |
| protocol: [ |
| "fuchsia.component.KcounterBinder", |
| "fuchsia.component.PersistenceBinder", |
| "fuchsia.component.SamplerBinder", |
| "fuchsia.exception.Handler", |
| "fuchsia.feedback.CrashReporter", |
| "fuchsia.feedback.DataProvider", |
| "fuchsia.metrics.MetricEventLoggerFactory", |
| "fuchsia.pkg.PackageResolver", |
| "fuchsia.pkg.RepositoryManager", |
| "fuchsia.pkg.rewrite.Engine", |
| "fuchsia.process.Resolver", |
| "fuchsia.settings.Input", |
| "fuchsia.ui.activity.Provider", |
| "fuchsia.update.CommitStatusProvider", |
| ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| }, |
| { |
| protocol: [ "fuchsia.component.DetectBinder" ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "same_as_target", |
| }, |
| { |
| protocol: [ "fuchsia.memorypressure.Provider" ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "optional", |
| }, |
| |
| // TODO(https://fxbug.dev/324494668): remove this when Netstack2 is gone. |
| { |
| directory: "netstack-diagnostics", |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "optional", |
| }, |
| |
| // Trace manager may be excluded from builds where tracing is not |
| // expected to be used for observability, such as in the bringup |
| // product and non-eng builds of any product. |
| { |
| protocol: [ |
| "fuchsia.tracing.controller.Controller", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.virtualization.DebianGuestManager", |
| "fuchsia.virtualization.LinuxManager", |
| "fuchsia.virtualization.TerminaGuestManager", |
| "fuchsia.virtualization.ZirconGuestManager", |
| ], |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "optional", |
| }, |
| |
| // The source of this protocol, debug-dash-launcher, |
| // may not be available on all products. |
| // Used by console-launcher. |
| { |
| protocol: "fuchsia.dash.Launcher", |
| from: "#core", |
| to: "#bootstrap", |
| dependency: "weak", |
| availability: "optional", |
| }, |
| { |
| protocol: "fuchsia.sys2.RealmExplorer", |
| from: "framework", |
| as: "fuchsia.sys2.RealmExplorer.root", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| protocol: "fuchsia.sys2.RealmQuery", |
| from: "framework", |
| as: "fuchsia.sys2.RealmQuery.root", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| protocol: "fuchsia.component.Introspector", |
| from: "framework", |
| as: "fuchsia.component.Introspector.root", |
| to: "#core", |
| }, |
| { |
| protocol: "fuchsia.sys2.LifecycleController", |
| from: "framework", |
| as: "fuchsia.sys2.LifecycleController.root", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| { |
| protocol: "fuchsia.sys2.RouteValidator", |
| from: "framework", |
| as: "fuchsia.sys2.RouteValidator.root", |
| to: [ |
| "#bootstrap", |
| "#core", |
| ], |
| }, |
| |
| // Offer boot resolver to `bootstrap` for driver usage. |
| { |
| resolver: "boot_resolver", |
| from: "parent", |
| to: "#bootstrap", |
| }, |
| { |
| service: "fuchsia.hardware.rtc.Service", |
| from: "#bootstrap", |
| to: "#core", |
| }, |
| { |
| protocol: [ |
| "fuchsia.power.broker.Topology", |
| "fuchsia.power.suspend.Stats", |
| "fuchsia.power.system.ActivityGovernor", |
| ], |
| from: "#bootstrap", |
| to: "#core", |
| availability: "optional", |
| }, |
| ], |
| expose: [ |
| // For reboot_on_terminate |
| { |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", |
| from: "#bootstrap", |
| }, |
| ], |
| environments: [ |
| { |
| name: "core-env", |
| extends: "realm", |
| runners: [ |
| { |
| runner: "elf", |
| from: "#elf_runner", |
| }, |
| ], |
| resolvers: [ |
| { |
| resolver: "base_resolver", |
| from: "#bootstrap", |
| scheme: "fuchsia-pkg", |
| }, |
| ], |
| }, |
| { |
| name: "elf-env", |
| extends: "realm", |
| runners: [ |
| { |
| runner: "elf", |
| from: "#elf_runner", |
| }, |
| ], |
| }, |
| ], |
| } |