| // Copyright 2021 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. |
| |
| // Realm that acts as a container for general system components. |
| { |
| include: [ |
| // Add capabilities used by legacy sys realm and legacy shells |
| "//src/sys/core/meta/svc_for_sys.core_shard.cml", |
| "syslog/offer.shard.cml", |
| ], |
| children: [ |
| { |
| name: "sl4f_bridge_server", |
| url: "fuchsia-pkg://fuchsia.com/sl4f-ffx-proxy-server#meta/sl4f_proxy_server.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "debug-dash-launcher", |
| url: "fuchsia-pkg://fuchsia.com/debug-dash-launcher#meta/debug_dash_launcher.cm", |
| }, |
| { |
| name: "session-manager", |
| url: "fuchsia-pkg://fuchsia.com/session_manager#meta/session_manager.cm", |
| startup: "eager", |
| environment: "#session-env", |
| }, |
| { |
| name: "system-update-committer", |
| url: "fuchsia-pkg://fuchsia.com/system-update-committer#meta/system-update-committer.cm", |
| startup: "eager", |
| on_terminate: "reboot", |
| }, |
| { |
| name: "mdns", |
| url: "fuchsia-pkg://fuchsia.com/mdns#meta/mdns.cm", |
| |
| // TODO(https://fxbug.dev/93539): consider removing eager startup in non-eng builds. |
| startup: "eager", |
| }, |
| { |
| name: "bluetooth-core", |
| url: "fuchsia-pkg://fuchsia.com/bt-init#meta/bt-init.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "sysmem_connector", |
| url: "fuchsia-pkg://fuchsia.com/sysmem_connector#meta/sysmem_connector.cm", |
| |
| // Until there is something analogous to on_terminate: "reboot" for drivers, we need |
| // sysmem_connector to terminate and trigger a reboot on behalf of sysmem if the sysmem |
| // driver terminates. |
| // |
| // TODO(fxbug.dev/96061): Once we have something like on_terminate: "reboot" for drivers |
| // we can remove both "eager" and "reboot" here. |
| startup: "eager", |
| on_terminate: "reboot", |
| }, |
| { |
| name: "cobalt_system_metrics", |
| url: "fuchsia-pkg://fuchsia.com/cobalt_system_metrics#meta/cobalt_system_metrics.cm", |
| startup: "eager", |
| }, |
| { |
| name: "timekeeper", |
| url: "fuchsia-pkg://fuchsia.com/timekeeper#meta/timekeeper.cm", |
| startup: "eager", |
| }, |
| |
| // Children below this line may be present on some but not all product configurations. |
| // Children above this line are expected to be present on all configs that include |
| // core.cml. |
| // |
| // TODO(fxbug.dev/81003): If any of the components below are product-specific, move them |
| // to core realm shards. |
| { |
| name: "activity", |
| url: "fuchsia-pkg://fuchsia.com/activity#meta/activity.cm", |
| }, |
| { |
| name: "brightness_manager", |
| url: "fuchsia-pkg://fuchsia.com/brightness_manager#meta/brightness_manager.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "cobalt", |
| url: "fuchsia-pkg://fuchsia.com/cobalt#meta/cobalt.cm", |
| }, |
| { |
| name: "detect", |
| url: "fuchsia-pkg://fuchsia.com/triage-detect#meta/triage-detect.cm", |
| }, |
| { |
| name: "diagnostics-persistence", |
| url: "fuchsia-pkg://fuchsia.com/diagnostics-persistence#meta/diagnostics-persistence.cm", |
| }, |
| { |
| name: "diagnostics-kcounter", |
| url: "fuchsia-pkg://fuchsia.com/diagnostics-kcounter#meta/diagnostics-kcounter.cm", |
| }, |
| { |
| name: "log-stats", |
| url: "fuchsia-pkg://fuchsia.com/log-stats#meta/log-stats.cm", |
| }, |
| { |
| name: "sampler", |
| url: "fuchsia-pkg://fuchsia.com/sampler#meta/sampler.cm", |
| }, |
| { |
| name: "starnix_manager", |
| url: "fuchsia-pkg://fuchsia.com/starnix#meta/starnix_manager.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "stash", |
| url: "fuchsia-pkg://fuchsia.com/stash#meta/stash.cm", |
| }, |
| { |
| name: "stash2", |
| url: "fuchsia-pkg://fuchsia.com/stash#meta/stash2.cm", |
| }, |
| { |
| name: "stash_secure", |
| url: "fuchsia-pkg://fuchsia.com/stash#meta/stash_secure.cm", |
| }, |
| { |
| name: "regulatory_region", |
| url: "fuchsia-pkg://fuchsia.com/regulatory_region#meta/regulatory_region.cm", |
| }, |
| { |
| name: "font_provider", |
| url: "fuchsia-pkg://fuchsia.com/fonts#meta/fonts.cm", |
| }, |
| { |
| name: "overnetstack", |
| url: "fuchsia-pkg://fuchsia.com/overnetstack#meta/overnetstack.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "remote-control", |
| url: "fuchsia-pkg://fuchsia.com/remote-control#meta/remote-control.cm", |
| }, |
| { |
| name: "remote-diagnostics-bridge", |
| url: "fuchsia-pkg://fuchsia.com/remote-diagnostics-bridge#meta/remote-diagnostics-bridge.cm", |
| }, |
| { |
| name: "debug_serial", |
| url: "fuchsia-pkg://fuchsia.com/debug-serial#meta/debug-serial.cm", |
| }, |
| { |
| name: "pkg-resolver", |
| url: "fuchsia-pkg://fuchsia.com/pkg-resolver#meta/pkg-resolver.cm", |
| }, |
| { |
| name: "vulkan_loader", |
| url: "fuchsia-pkg://fuchsia.com/vulkan_loader#meta/vulkan_loader.cm", |
| environment: "#core-env", |
| }, |
| { |
| name: "ssh-key-manager", |
| url: "fuchsia-pkg://fuchsia.com/ssh-key-manager#meta/ssh-key-manager.cm", |
| }, |
| { |
| name: "full-resolver", |
| url: "fuchsia-pkg://fuchsia.com/full-resolver#meta/full-resolver.cm", |
| }, |
| { |
| name: "network", |
| url: "fuchsia-pkg://fuchsia.com/network#meta/network.cm", |
| startup: "eager", |
| }, |
| { |
| name: "hwinfo", |
| url: "fuchsia-pkg://fuchsia.com/hwinfo#meta/hwinfo.cm", |
| }, |
| { |
| name: "agis", |
| url: "fuchsia-pkg://fuchsia.com/agis#meta/agis.cm", |
| environment: "#core-env", |
| }, |
| ], // children |
| capabilities: [ |
| // Note: `data`, `cache`, and `temp` storage capabilities are defined in a shard and |
| // included as part of the build process. See restricted-storage.core_shard.cml or |
| // unrestricted-storage.core_shard.cml |
| ], |
| offer: [ |
| { |
| protocol: [ "fuchsia.kernel.DebugResource" ], |
| from: "parent", |
| to: "#debug_serial", |
| }, |
| { |
| protocol: [ "fuchsia.ui.activity.Provider" ], |
| from: "#activity", |
| to: [ |
| "#cobalt_system_metrics", |
| "#log-stats", |
| ], |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-sysmem", |
| to: "#sysmem_connector", |
| subdir: "class/sysmem", |
| }, |
| { |
| protocol: "fuchsia.pkg.FontResolver", |
| from: "void", |
| to: "#font_provider", |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.device.NameProvider" ], |
| from: "parent", |
| to: [ |
| "#bluetooth-core", |
| "#mdns", |
| "#network", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.scheduler.ProfileProvider" ], |
| from: "parent", |
| to: [ "#network" ], |
| }, |
| { |
| protocol: "fuchsia.net.http.Loader", |
| from: "#network", |
| to: "#cobalt", |
| }, |
| { |
| protocol: [ "fuchsia.net.interfaces.State" ], |
| from: "#network", |
| to: [ |
| "#mdns", |
| "#remote-control", |
| "#timekeeper", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.net.name.Lookup", |
| "fuchsia.posix.socket.Provider", |
| ], |
| from: "#network", |
| to: [ |
| "#cobalt", |
| "#mdns", |
| "#pkg-resolver", |
| "#timekeeper", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.posix.socket.Provider" ], |
| from: "#network", |
| to: [ "#agis" ], |
| }, |
| { |
| protocol: [ "fuchsia.posix.socket.Provider" ], |
| from: "#network", |
| to: [ "#sl4f_bridge_server" ], |
| }, |
| { |
| protocol: [ "fuchsia.posix.socket.Provider" ], |
| from: "#network", |
| to: [ "#starnix_manager" ], |
| }, |
| { |
| protocol: "fuchsia.stash.SecureStore", |
| from: "#stash_secure", |
| to: [ |
| "#bluetooth-core", |
| "#network", |
| ], |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: [ "#network" ], |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-class-ethernet", |
| to: [ "#network" ], |
| subdir: "class/ethernet", |
| }, |
| { |
| directory: "dev-class", |
| from: "parent", |
| as: "dev-class-network", |
| to: [ "#network" ], |
| subdir: "network", |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: [ "#network" ], |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: [ "#network" ], |
| }, |
| { |
| protocol: "fuchsia.pkg.PackageResolver", |
| from: "#pkg-resolver", |
| to: "#full-resolver", |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.pkg.PackageCache", |
| ], |
| from: "parent", |
| to: "#pkg-resolver", |
| }, |
| { |
| // This capability is only offered to pkg-resolver in test scenarios |
| protocol: "fuchsia.pkg.LocalMirror", |
| from: "void", |
| to: "#pkg-resolver", |
| availability: "optional", |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: "#pkg-resolver", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#pkg-resolver", |
| subdir: "pkg-resolver", |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.ArchiveAccessor", |
| "fuchsia.logger.Log", |
| ], |
| from: "parent", |
| to: [ |
| "#log-stats", |
| "#sampler", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister" ], |
| from: "parent", |
| to: "#sampler", |
| }, |
| { |
| protocol: [ "fuchsia.diagnostics.FeedbackArchiveAccessor" ], |
| from: "parent", |
| to: [ |
| "#detect", |
| "#diagnostics-persistence", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.diagnostics.persist.DataPersistence-netstack" ], |
| from: "#diagnostics-persistence", |
| to: "#network", |
| }, |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "parent", |
| to: "#debug-dash-launcher", |
| }, |
| { |
| protocol: "fuchsia.pkg.PackageResolver", |
| from: "#pkg-resolver", |
| to: "#debug-dash-launcher", |
| }, |
| { |
| protocol: [ "fuchsia.kernel.Counter" ], |
| from: "parent", |
| to: "#diagnostics-kcounter", |
| }, |
| { |
| protocol: [ |
| "fuchsia.hardware.power.statecontrol.Admin", |
| "fuchsia.paver.Paver", |
| "fuchsia.update.verify.BlobfsVerifier", |
| ], |
| from: "parent", |
| to: "#system-update-committer", |
| }, |
| { |
| protocol: [ "fuchsia.kernel.VmexResource" ], |
| from: "parent", |
| to: "#starnix_manager", |
| }, |
| { |
| protocol: [ "fuchsia.sysmem.Allocator" ], |
| from: "#sysmem_connector", |
| to: [ |
| "#agis", |
| "#starnix_manager", |
| ], |
| }, |
| { |
| protocol: "fuchsia.factory.MiscFactoryStoreProvider", |
| from: "#factory_store_providers", |
| to: "#hwinfo", |
| source_availability: "unknown", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#hwinfo", |
| subdir: "hwinfo", |
| }, |
| { |
| protocol: [ |
| "fuchsia.overnet.Overnet", |
| "fuchsia.overnet.ServicePublisher", |
| ], |
| from: "#overnetstack", |
| to: "#remote-control", |
| }, |
| { |
| protocol: [ "fuchsia.posix.socket.Provider" ], |
| from: "#network", |
| to: "#remote-control", |
| }, |
| { |
| protocol: "fuchsia.hwinfo.Device", |
| from: "#hwinfo", |
| to: "#remote-control", |
| }, |
| { |
| protocol: [ "fuchsia.device.NameProvider" ], |
| from: "parent", |
| to: "#remote-control", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: [ "#remote-control" ], |
| subdir: "remote-control", |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.ArchiveAccessor", |
| "fuchsia.sys2.RealmExplorer.root", |
| "fuchsia.sys2.RealmQuery.root", |
| ], |
| from: "parent", |
| to: "#remote-diagnostics-bridge", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#font_provider", |
| subdir: "fonts", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#sampler", |
| subdir: "sampler", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#diagnostics-persistence", |
| subdir: "diagnostics-persistence", |
| }, |
| { |
| protocol: [ |
| "fuchsia.feedback.CrashReporter", |
| "fuchsia.feedback.CrashReportingProductRegister", |
| ], |
| from: "#feedback", |
| to: "#detect", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.kernel.Stats", |
| from: "parent", |
| to: [ |
| "#cobalt_system_metrics", |
| "#remote-control", |
| ], |
| }, |
| { |
| protocol: "fuchsia.boot.Arguments", |
| from: "parent", |
| to: "#remote-control", |
| }, |
| { |
| protocol: "fuchsia.process.Launcher", |
| from: "parent", |
| to: "#debug-dash-launcher", |
| }, |
| { |
| protocol: "fuchsia.sys2.RealmQuery.root", |
| from: "parent", |
| as: "fuchsia.sys2.RealmQuery", |
| to: "#debug-dash-launcher", |
| }, |
| { |
| protocol: [ "fuchsia.ui.display.internal.DisplayPower" ], |
| from: "#ui", |
| to: "#brightness_manager", |
| dependency: "weak", |
| source_availability: "unknown", |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: "#brightness_manager", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-backlight", |
| to: "#brightness_manager", |
| subdir: "class/backlight", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-input-report", |
| to: "#brightness_manager", |
| subdir: "class/input-report", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| to: "#sysmem_connector", |
| subdir: "class/sysmem", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-thermal", |
| to: "#cobalt_system_metrics", |
| subdir: "class/thermal", |
| }, |
| { |
| directory: "root-ssl-certificates", |
| from: "parent", |
| to: [ |
| "#cobalt", |
| "#network", |
| "#pkg-resolver", |
| "#timekeeper", |
| ], |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#detect", |
| subdir: "triage-detect", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#log-stats", |
| subdir: "log-stats", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#system-update-committer", |
| subdir: "system-update-committer", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#cobalt", |
| subdir: "cobalt", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#cobalt_system_metrics", |
| subdir: "cobalt_system_metrics", |
| }, |
| { |
| directory: "data", |
| from: "parent", |
| as: "ssh", |
| to: "#ssh-key-manager", |
| subdir: "ssh", |
| }, |
| |
| // Note: These protocols are scoped to the root of the component topoology, |
| // hence the `.root` suffix |
| { |
| protocol: [ |
| "fuchsia.sys2.LifecycleController.root", |
| "fuchsia.sys2.RealmExplorer.root", |
| "fuchsia.sys2.RealmQuery.root", |
| "fuchsia.sys2.RouteValidator.root", |
| ], |
| from: "parent", |
| to: "#remote-control", |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: [ |
| "#stash", |
| "#stash2", |
| "#stash_secure", |
| ], |
| }, |
| { |
| storage: [ "cache" ], |
| from: "self", |
| to: "#regulatory_region", |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: "#diagnostics-persistence", |
| }, |
| { |
| protocol: [ "fuchsia.vulkan.loader.Loader" ], |
| from: "#vulkan_loader", |
| to: [ |
| "#agis", |
| "#starnix_manager", |
| ], |
| }, |
| { |
| directory: "dev-class", |
| from: "parent", |
| as: "dev-display-controller", |
| to: [ "#agis" ], |
| subdir: "display-controller", |
| }, |
| { |
| protocol: "fuchsia.memorypressure.Provider", |
| from: "#memory_monitor", |
| to: "#vulkan_loader", |
| source_availability: "unknown", |
| }, |
| { |
| directory: "dev-class", |
| from: "parent", |
| as: "dev-gpu", |
| to: [ |
| "#starnix_manager", |
| "#vulkan_loader", |
| ], |
| subdir: "gpu", |
| }, |
| { |
| directory: "dev-class", |
| from: "parent", |
| as: "dev-gpu-dependency-injection", |
| to: "#vulkan_loader", |
| subdir: "gpu-dependency-injection", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-goldfish-pipe", |
| to: "#vulkan_loader", |
| subdir: "class/goldfish-pipe", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-goldfish-control", |
| to: "#vulkan_loader", |
| subdir: "class/goldfish-control", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-goldfish-address-space", |
| to: "#vulkan_loader", |
| subdir: "class/goldfish-address-space", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-goldfish-sync", |
| to: "#vulkan_loader", |
| subdir: "class/goldfish-sync", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| to: "#bluetooth-core", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-rtc", |
| to: "#timekeeper", |
| subdir: "class/rtc", |
| }, |
| { |
| protocol: "fuchsia.metrics.MetricEventLoggerFactory", |
| from: "#cobalt", |
| to: [ |
| "#cobalt_system_metrics", |
| "#log-stats", |
| "#pkg-resolver", |
| "#sampler", |
| "#sysmem_connector", |
| "#timekeeper", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.scheduler.ProfileProvider", |
| "fuchsia.sysinfo.SysInfo", |
| ], |
| from: "parent", |
| to: "#cobalt", |
| }, |
| { |
| protocol: "fuchsia.sysinfo.SysInfo", |
| from: "parent", |
| to: "#cobalt_system_metrics", |
| }, |
| { |
| protocol: "fuchsia.settings.Privacy", |
| from: "#setui_service", |
| to: "#cobalt", |
| |
| // TODO: break the cycle |
| dependency: "weak", |
| source_availability: "unknown", |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: [ |
| "#cobalt", |
| "#cobalt_system_metrics", |
| ], |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#mdns", |
| subdir: "mdns", |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| to: "#mdns", |
| }, |
| { |
| protocol: [ "fuchsia.time.Maintenance" ], |
| from: "parent", |
| to: [ "#timekeeper" ], |
| }, |
| { |
| protocol: [ "fuchsia.tracing.provider.Registry" ], |
| from: "#trace_manager", |
| to: [ |
| "#agis", |
| "#cobalt_system_metrics", |
| "#font_provider", |
| "#starnix_manager", |
| "#sysmem_connector", |
| ], |
| |
| // 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. |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ "fuchsia.tracing.provider.Registry" ], |
| from: "#trace_manager", |
| to: [ |
| "#cobalt", |
| "#network", |
| "#pkg-resolver", |
| ], |
| |
| // Weak offers to resolve dependency cycles that would be caused by |
| // using #core-env. |
| dependency: "weak", |
| |
| // 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. |
| source_availability: "unknown", |
| }, |
| ], |
| expose: [ |
| { |
| protocol: "fuchsia.component.Binder", |
| from: "framework", |
| }, |
| { |
| protocol: [ "fuchsia.metrics.MetricEventLoggerFactory" ], |
| from: "#cobalt", |
| }, |
| { |
| protocol: [ "fuchsia.component.Binder" ], |
| from: "#detect", |
| as: "fuchsia.component.DetectBinder", |
| }, |
| { |
| protocol: [ "fuchsia.component.Binder" ], |
| from: "#diagnostics-kcounter", |
| as: "fuchsia.component.KcounterBinder", |
| }, |
| { |
| protocol: [ "fuchsia.component.Binder" ], |
| from: "#diagnostics-persistence", |
| as: "fuchsia.component.PersistenceBinder", |
| }, |
| { |
| protocol: [ "fuchsia.component.Binder" ], |
| from: "#log-stats", |
| as: "fuchsia.component.LogStatsBinder", |
| }, |
| { |
| protocol: [ "fuchsia.component.Binder" ], |
| from: "#sampler", |
| as: "fuchsia.component.SamplerBinder", |
| }, |
| { |
| protocol: [ |
| "fuchsia.pkg.PackageResolver", |
| "fuchsia.pkg.RepositoryManager", |
| "fuchsia.pkg.rewrite.Engine", |
| ], |
| from: "#pkg-resolver", |
| }, |
| { |
| protocol: [ "fuchsia.ui.activity.Provider" ], |
| from: "#activity", |
| }, |
| { |
| protocol: "fuchsia.update.CommitStatusProvider", |
| from: "#system-update-committer", |
| }, |
| { |
| protocol: [ |
| "fuchsia.net.name.Lookup", |
| "fuchsia.posix.socket.Provider", |
| ], |
| from: "#network", |
| }, |
| ], |
| } |