| // Copyright 2024 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: "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: "boot-shell-commands", |
| url: "fuchsia-boot:///boot-shell-commands#meta/shell-commands.cm", |
| }, |
| ], |
| offer: [ |
| { |
| config: [ "fuchsia.virtcon.Disable" ], |
| from: "parent", |
| to: "#console-launcher", |
| availability: "optional", |
| }, |
| |
| // Offer the kernel serial console to the console-launcher |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#console", |
| as: "console", |
| to: "#console-launcher", |
| }, |
| { |
| protocol: "fuchsia.tracing.provider.Registry", |
| from: "parent", |
| to: "#console-launcher", |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.FactoryItems", |
| "fuchsia.boot.Items", |
| "fuchsia.boot.ReadOnlyLog", |
| "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", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.DebugResource", |
| "fuchsia.kernel.InfoResource", |
| "fuchsia.kernel.ProfileResource", |
| ], |
| from: "parent", |
| to: [ "#console-launcher" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.dash.Launcher", |
| "fuchsia.tracing.controller.Provisioner", |
| ], |
| from: "parent", |
| to: [ "#console-launcher" ], |
| availability: "optional", |
| }, |
| |
| // Allow shell tools launched from the console to use the root Realm |
| // querying protocols. |
| { |
| protocol: [ |
| "fuchsia.sys2.ConfigOverride.root", |
| "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: https://fxbug.dev/42054333 |
| availability: "optional", |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| to: "#console-launcher", |
| rights: [ "rx*" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.kernel.DebugResource", |
| ], |
| from: "parent", |
| to: "#console", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.Counter", |
| "fuchsia.kernel.DebugBroker", |
| ], |
| from: "#kernel_debug_broker", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ "fuchsia.virtualconsole.SessionManager" ], |
| from: "#virtual_console", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ "fuchsia.driver.development.Manager" ], |
| from: "#driver_manager", |
| to: "#console-launcher", |
| }, |
| { |
| protocol: [ |
| "fuchsia.scheduler.deprecated.ProfileProvider", |
| "fuchsia.scheduler.RoleManager", |
| ], |
| from: "#role_manager", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| directory: "dev-topological", |
| from: "#devfs-with-pkg", |
| to: "#console-launcher", |
| }, |
| { |
| directory: [ |
| "pkgfs", |
| "root-ssl-certificates", |
| "system", |
| ], |
| from: "#pkg-cache", |
| to: "#console-launcher", |
| availability: "optional", |
| source_availability: "unknown", |
| }, |
| { |
| directory: "bin", |
| from: "#pkg-shell-commands", |
| as: "base-bin", |
| to: "#console-launcher", |
| availability: "optional", |
| source_availability: "unknown", |
| }, |
| { |
| directory: "bin", |
| from: "#boot-shell-commands", |
| as: "boot-bin", |
| to: "#console-launcher", |
| availability: "optional", |
| source_availability: "unknown", |
| }, |
| { |
| directory: [ |
| "blob", |
| "data", |
| "tmp", |
| ], |
| from: "#fshost", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ "fuchsia.fshost.Admin" ], |
| from: "#fshost", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.device.NameProvider", |
| from: "#device_name_provider", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.hardware.pty.Device", |
| from: "#ptysvc", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.sysinfo.SysInfo", |
| from: "#sysinfo", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", |
| from: "#shutdown_shim", |
| to: "#console-launcher", |
| }, |
| { |
| service: "fuchsia.hardware.spmi.DebugService", |
| from: "#boot-drivers", |
| to: "#console-launcher", |
| }, |
| { |
| service: "fuchsia.hardware.nfc.Service", |
| from: "#boot-drivers", |
| to: "#console-launcher", |
| }, |
| { |
| service: "fuchsia.gpu.magma.Service", |
| from: "#boot-drivers", |
| to: "#console-launcher", |
| }, |
| { |
| protocol: "fuchsia.paver.Paver", |
| from: "#paver", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.sysmem2.Allocator", |
| ], |
| from: "#sysmem", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| dictionary: "diagnostics", |
| from: "self", |
| to: [ |
| "#boot-shell-commands", |
| "#console", |
| "#console-launcher", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.ArchiveAccessor", |
| "fuchsia.diagnostics.host.ArchiveAccessor", |
| ], |
| from: "#archivist/diagnostics-accessors", |
| to: "#console-launcher", |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.LogSettings", |
| "fuchsia.logger.Log", |
| ], |
| from: "#archivist", |
| to: [ |
| "#console", |
| "#console-launcher", |
| ], |
| }, |
| { |
| service: "fuchsia.hardware.suspend.SuspendService", |
| from: "#boot-drivers", |
| to: "#console-launcher", |
| }, |
| { |
| protocol: [ |
| "fuchsia.power.suspend.Stats", |
| "fuchsia.power.system.ActivityGovernor", |
| "fuchsia.power.system.BootControl", |
| ], |
| from: "#system-activity-governor", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "test.sagcontrol.State", |
| from: "#system-activity-governor", |
| to: "#console-launcher", |
| availability: "optional", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "fuchsia.power.broker.Topology", |
| from: "#power-broker", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: "test.suspendcontrol.Device", |
| from: "#fake-suspend", |
| to: "#console-launcher", |
| availability: "optional", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ |
| "fuchsia.test.manager.Query", |
| "fuchsia.test.manager.RunBuilder", |
| "fuchsia.test.manager.SuiteRunner", |
| "fuchsia.test.manager.TestCaseEnumerator", |
| ], |
| from: "#test_manager", |
| to: "#console-launcher", |
| source_availability: "unknown", |
| }, |
| ], |
| expose: [ |
| { |
| directory: "bin", |
| from: "#boot-shell-commands", |
| as: "boot-bin", |
| }, |
| ], |
| } |