| // 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. |
| { |
| include: [ |
| "inspect/client.shard.cml", |
| "syslog/client.shard.cml", |
| "trace/client.shard.cml", |
| ], |
| program: { |
| runner: "elf", |
| binary: "bin/blobfs", |
| args: [ "component" ], |
| lifecycle: { stop_event: "notify" }, |
| }, |
| children: [ |
| { |
| name: "decompressor", |
| url: "#meta/decompressor-sandbox.cm", |
| }, |
| ], |
| capabilities: [ |
| { |
| directory: "root", |
| rights: [ "rw*" ], |
| path: "/root", |
| }, |
| { |
| directory: "blob-exec", |
| rights: [ |
| "execute", |
| "rw*", |
| ], |
| path: "/root", |
| }, |
| { |
| protocol: [ |
| "fuchsia.fs.Admin", |
| "fuchsia.fxfs.BlobCreator", |
| "fuchsia.fxfs.BlobReader", |
| "fuchsia.update.verify.ComponentOtaHealthCheck", |
| ], |
| }, |
| { |
| protocol: "fuchsia.fs.startup.Startup", |
| path: "/startup/fuchsia.fs.startup.Startup", |
| }, |
| ], |
| use: [ |
| { |
| protocol: [ |
| // Without this, blobfs won't be able to mint executables, but it can still read |
| // and write blobs. |
| "fuchsia.kernel.VmexResource", |
| |
| // Without this, blobfs won't be able to set the deadline profile for it's pager |
| // threads, which may degrade performance. |
| "fuchsia.scheduler.RoleManager", |
| ], |
| availability: "optional", |
| }, |
| { |
| protocol: "fuchsia.blobfs.internal.DecompressorCreator", |
| from: "#decompressor", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: "fuchsia.scheduler.RoleManager", |
| from: "parent", |
| to: "#decompressor", |
| availability: "optional", |
| }, |
| ], |
| expose: [ |
| { |
| directory: "root", |
| from: "self", |
| }, |
| { |
| directory: "blob-exec", |
| from: "self", |
| }, |
| { |
| protocol: [ |
| "fuchsia.fs.Admin", |
| "fuchsia.fs.startup.Startup", |
| "fuchsia.fxfs.BlobCreator", |
| "fuchsia.fxfs.BlobReader", |
| "fuchsia.update.verify.ComponentOtaHealthCheck", |
| ], |
| from: "self", |
| }, |
| { |
| protocol: "fuchsia.update.verify.ComponentOtaHealthCheck", |
| from: "self", |
| to: "framework", |
| }, |
| ], |
| config: { |
| // The number of pager threads to spawn. Setting to <= 0 will result in an |
| // implementation-chosen value being used. |
| pager_threads: { type: "int32" }, |
| }, |
| } |