| // 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. |
| { |
| include: [ |
| "inspect/client.shard.cml", |
| "syslog/client.shard.cml", |
| ], |
| children: [ |
| { |
| name: "driver_manager", |
| url: "#meta/driver_manager_test.cm", |
| startup: "eager", |
| environment: "#driver_manager-env", |
| }, |
| { |
| name: "driver-manager-support", |
| url: "#meta/driver_manager_support.cm", |
| }, |
| { |
| name: "driver-index", |
| url: "#meta/driver-index.cm", |
| }, |
| ], |
| collections: [ |
| { |
| name: "driver-hosts", |
| environment: "#driver-host-env", |
| durability: "single_run", |
| }, |
| { |
| name: "boot-drivers", |
| environment: "#driver-env", |
| durability: "single_run", |
| allowed_offers: "static_and_dynamic", |
| }, |
| { |
| name: "pkg-drivers", |
| environment: "#driver-env", |
| durability: "single_run", |
| allowed_offers: "static_and_dynamic", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: "fuchsia.component.Realm", |
| from: "framework", |
| to: "#driver_manager", |
| }, |
| { |
| protocol: [ |
| "fuchsia.device.composite.DeprecatedCompositeCreator", |
| "fuchsia.device.fs.Exporter", |
| ], |
| from: "#driver_manager", |
| to: [ |
| "#boot-drivers", |
| "#pkg-drivers", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.logger.LogSink" ], |
| from: "parent", |
| to: [ |
| "#boot-drivers", |
| "#driver-hosts", |
| "#driver-index", |
| "#driver-manager-support", |
| "#driver_manager", |
| "#pkg-drivers", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.boot.RootResource" ], |
| from: "parent", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.process.Launcher", |
| "fuchsia.sys.Launcher", |
| ], |
| from: "parent", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.Items", |
| "fuchsia.kernel.RootJob", |
| ], |
| from: "#driver-manager-support", |
| to: [ "#boot-drivers" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Arguments", |
| "fuchsia.boot.Items", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.power.manager.DriverManagerRegistration", |
| ], |
| from: "#driver-manager-support", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ "fuchsia.boot.Arguments" ], |
| from: "#driver-manager-support", |
| to: "#driver-index", |
| }, |
| { |
| protocol: [ |
| "fuchsia.driver.development.DriverIndex", |
| "fuchsia.driver.index.DriverIndex", |
| "fuchsia.driver.registrar.DriverRegistrar", |
| ], |
| from: "#driver-index", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ "fuchsia.pkg.PackageResolver" ], |
| from: "#driver-manager-support", |
| to: [ |
| "#driver-index", |
| "#driver_manager", |
| ], |
| }, |
| { |
| directory: "pkgfs", |
| from: "#driver-manager-support", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| directory: "system", |
| from: "#driver-manager-support", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| directory: "pkgfs-packages", |
| from: "#driver-manager-support", |
| to: [ "#driver-index" ], |
| }, |
| { |
| directory: "boot", |
| from: "#driver-manager-support", |
| to: [ |
| "#driver-index", |
| "#driver_manager", |
| ], |
| rights: [ "rx*" ], |
| }, |
| ], |
| expose: [ |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| }, |
| { |
| protocol: [ |
| "fuchsia.device.fs.Exporter", |
| "fuchsia.device.manager.Administrator", |
| "fuchsia.device.manager.DebugDumper", |
| "fuchsia.device.manager.SystemStateTransition", |
| "fuchsia.driver.development.DriverDevelopment", |
| "fuchsia.hardware.pci.DeviceWatcher", |
| "fuchsia.hardware.usb.DeviceWatcher", |
| ], |
| from: "#driver_manager", |
| }, |
| { |
| protocol: "fuchsia.driver.registrar.DriverRegistrar", |
| from: "#driver-index", |
| }, |
| { |
| runner: "driver", |
| from: "#driver_manager", |
| }, |
| { |
| protocol: [ "fuchsia.driver.test.Realm" ], |
| from: "#driver-manager-support", |
| }, |
| ], |
| environments: [ |
| { |
| name: "driver_manager-env", |
| extends: "realm", |
| |
| // 1 minute |
| __stop_timeout_ms: 60000, |
| }, |
| { |
| name: "driver-host-env", |
| extends: "realm", |
| |
| // 20 seconds |
| __stop_timeout_ms: 20000, |
| }, |
| { |
| name: "driver-env", |
| extends: "realm", |
| runners: [ |
| { |
| runner: "driver", |
| from: "#driver_manager", |
| }, |
| ], |
| resolvers: [ |
| { |
| resolver: "boot-resolver", |
| from: "#driver-manager-support", |
| scheme: "fuchsia-boot", |
| }, |
| ], |
| |
| // 10 seconds |
| __stop_timeout_ms: 10000, |
| }, |
| ], |
| } |