blob: cba6f0df53488c1a23e606ca9514dde372aa38d5 [file] [log] [blame]
# Copyright 2020 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/images/custom_signing.gni")
import("//build/images/vbmeta.gni")
declare_args() {
# Use vboot images
use_vboot = false
# Put the "system image" package in the BOOTFS. Hence what would
# otherwise be /system/... at runtime is /boot/... instead.
bootfs_only = false
# List of arguments to add to /boot/config/devmgr.
# These come after synthesized arguments to configure blobfs and pkgfs.
devmgr_config = []
# Generate a UEFI disk image
build_uefi_disk = false
# (deprecated) List of kernel images to include in the update (OTA) package.
# If no list is provided, all built kernels are included. The names in the
# list are strings that must match the filename to be included in the update
# package.
update_kernels = []
# List of prebuilt firmware blobs to include in update packages.
#
# Each entry in the list is a scope containing:
# * `path`: path to the image (see also `firmware_prebuilts_path_suffix`)
# * `type`: firmware type, a device-specific unique identifier
# * `partition` (optional): if specified, the `fastboot flash` partition
firmware_prebuilts = []
# Suffix to append to all `firmware_prebuilts` `path` variables.
#
# Typically this indicates the hardware revision, and is made available so
# that users can easily switch revisions using a single arg.
firmware_prebuilts_path_suffix = ""
# GUID Partition Table (GPT) image.
#
# Typically useful for initially flashing a device from zero-state.
gpt_image = ""
# Path to manifest file containing data to place into the initial /data
# partition.
data_partition_manifest = ""
# Whether to build the netboot zbi by default.
#
# You can still build //build/images:netboot explicitly even if enable_netboot is false.
enable_netboot = false
# A list of labels for meta packages to be included in the monolith.
meta_package_labels = []
# Arguments to `fx flash` script (along with any `firmware_prebuilts` which
# specify a partition).
#
# If `fvm_partition` is provided, the flash script will flash the full OS,
# recovery + Zircon + FVM + SSH keys. In this case, the bootloader must also
# support `fastboot oem add-staged-bootloader-file ssh.authorized_keys`.
#
# Otherwise, the script will flash the recovery image to all slots, which
# doesn't require the FVM or SSH keys.
zircon_a_partition = ""
zircon_b_partition = ""
zircon_r_partition = ""
vbmeta_a_partition = ""
vbmeta_b_partition = ""
vbmeta_r_partition = ""
fvm_partition = ""
active_partition = ""
fastboot_product = ""
pre_erase_flash = false
# Whether to include images necessary to run Fuchsia in QEMU in build
# archives.
add_qemu_to_build_archives = false
# Additional bootserver args to add to pave.sh. New uses of this should be
# added with caution, and ideally discussion. The present use case is to
# enable throttling of netboot when specific network adapters are combined
# with specific boards, due to driver and hardware challenges.
additional_bootserver_arguments = ""
# Whether to perform check on the build's eligibility for production.
# If true, base_packages and cache_packages are checked against dependencies
# on //build/validate:non_production_tag, which is used to tag any
# non-production GN labels. Build will fail if such dependency is found.
check_production_eligibility = false
# Whether to compress the blobfs image.
compress_blobs = true
# The format blobfs should store blobs in.
blob_layout_format = "compact"
# Build boot images that prefer Zedboot over local boot (only for EFI).
always_zedboot = false
# The allowlist file to load for /pkgfs/packages non-base packages
pkgfs_packages_allowlist =
"//src/security/policy/pkgfs_non_static_pkgs_allowlist_eng.txt"
# Include fvm.blob.sparse.blk image into the build if set to true
include_fvm_blob_sparse = false
# Allows a product to specify the recovery image used in the zirconr slot.
# Default recovery image is zedboot. Overriding this value will keep zedboot
# in the build but will not include it as the default zirconr image.
# Recovery images can provide an update target by specifying the metadata item
# "update_target" in the format <target>=<path>. (Such as `update_target =
# [ "recovery=" + rebase_path(recovery_path, root_build_dir) ]`)
# Example value: "//build/images/recovery"
recovery_label = "//build/images/zedboot"
#TODO(comfoltey) remove obsolete label override_recovery_label
override_recovery_label = ""
# List of paths to board-specific tools to include in the build output.
#
# Most development tools can just be used in-tree and do not need to be
# included here. This arg is only meant for tools which may need to be
# distributed along with the build files, for example tools for flashing
# from SoC recovery mode.
#
# Assets included in this way are included best-effort only and do not form
# any kind of stable contract for users of the archive.
board_tools = []
}
assert(custom_signing_script == "" || !use_vboot,
"custom_signing_script and use_vboot cannot be used together!")
assert(
!include_devmgr_config_in_vbmeta || use_vbmeta,
"include_devmgr_config_in_vbmeta cannot be used if use_vbmeta is not set!")