blob: d6aa54b249f45d445b5cc6875442dd2d37337f3e [file] [log] [blame]
# 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.
import("//build/components.gni")
import("//build/images/args.gni")
declare_args() {
# Set to one of "minfs", "fxfs", "f2fs" (unstable).
# If set to anything other than "minfs", any existing minfs partition will be
# migrated in-place to the specified format when fshost mounts it.
data_filesystem_format = "fxfs"
# Use Fxfs's blob implementation
# Changes the flashing logic because the outputs changed.
# Toggles a bunch of tests to use fxfs.
fxfs_blob = true
}
# Generates a config CML file for fshost.
# The name of the config CML is "{component_name}_config.cml" and the config
# values can be routed from it.
#
# Parameters:
#
# component_name (optional)
# [string] The name of the component for which to produce config, defaults to "fshost".
#
# options (optional)
# [scope] A block of fshost configuration options to include in the config file.
# Unrecognized options cause errors. Later options override earlier options. The provided
# values override all other values, including defaults and build args.
#
template("generated_fshost_config") {
_manifest_target = "${target_name}_manifest"
_component_name = "fshost_config"
if (defined(invoker.component_name)) {
_component_name = invoker.component_name
}
fuchsia_component_manifest(_manifest_target) {
component_name = _component_name
manifest = "//src/storage/fshost/meta/config.cml"
metadata = {
# we don't want this in the packaged output, it's just to give cmc something to work with
distribution_entries_barrier = []
}
}
fuchsia_structured_config_values2(target_name) {
output_component_name = _component_name + "_config"
cm_label = ":$_manifest_target"
values = {
# Defaults
blobfs = true
blobfs_max_bytes = 0
bootpart = true
check_filesystems = true
data = true
data_max_bytes = 0
disable_block_watcher = false
factory = false
fvm = true
ramdisk_image = false
fxfs_blob = true
fxfs_crypt_url = "fuchsia-boot:///fxfs-crypt#meta/fxfs-crypt.cm"
gpt = true
gpt_all = false
mbr = false
netboot = false
no_zxcrypt = false
fvm_slice_size = 8388608
blobfs_initial_inodes = 0
blobfs_use_deprecated_padded_format = false
data_filesystem_format = "fxfs"
format_data_on_corruption = true
nand = false
use_disk_migration = false
storage_host = false
disable_automount = false
blobfs_write_compression_algorithm = ""
blobfs_cache_eviction_policy = ""
if (defined(invoker.options)) {
forward_variables_from(invoker.options, "*")
}
}
}
}