blob: 6cd33f9de0f0b4677d544309eebfab2f28a5ce2d [file] [log] [blame]
# Copyright 2019 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/board.gni")
import("//build/images/assemble_system.gni")
import("//build/images/ta.gni")
import("//build/images/zedboot/zedboot_args.gni")
import("//build/testing/host_test_data.gni")
declare_args() {
# List of binaries to include in the bootfs manifest for recovery. This
# overrides the option set by `bootfs_zircon_groups` so that only the requested
# binaries are included in the final image.
bootfs_allowlist_recovery = []
}
group("recovery") {
testonly = true
public_deps = [
":recovery-eng",
":recovery-fdr",
]
}
recovery_packages = [
"//build/info:build-info",
"//garnet/bin/network_time_service",
"//garnet/bin/sysmgr",
"//garnet/packages/prod:sysmem_connector",
"//garnet/packages/prod:broadcom",
"//src/connectivity/management:network_config_default",
"//src/connectivity/network:config",
"//src/connectivity/wlan/config:default",
"//src/connectivity/wlan/wlancfg",
"//src/connectivity/wlan/wlanstack",
"//src/recovery/system",
"//src/recovery/system:config",
"//src/security/root_ssl_certificates",
"//src/sys/appmgr",
"//src/sys/appmgr:appmgr_scheme_config",
"//src/sys/core",
"//src/sys/pkg/bin/amber",
"//src/sys/pkg/bin/omaha-client",
"//src/sys/pkg/bin/pkg-cache",
"//src/sys/pkg/bin/pkg-resolver",
"//src/sys/stash",
"//src/sys/timekeeper",
"//src/connectivity/network/http_client",
]
recovery_eng_packages =
recovery_packages + [
# So components can be launched:
"//src/sys/tools/run",
# Basic command-line tools:
"//garnet/packages/prod:sbase",
# Command-line interface to wlan stack:
"//src/connectivity/wlan/wlancfg/tool:donut",
# Device side of zxdb & fidlcat, including required policies:
"//src/developer/debug/debug_agent",
"//src/security/policy:appmgr_root_job_allowlist_eng",
]
assemble_system("recovery-eng") {
base_packages = recovery_eng_packages
# We avoid compressing blobs in the blobfs image so that they can be more
# effectively compressed by the ZBI compressor that is tuned to zstd max.
compress_blobs = false
netboot = true
devmgr_config = [ "virtcon.disable=true" ] + zedboot_devmgr_config
cmdline = [
"console.shell=true",
"netsvc.disable=false",
"kernel.enable-debugging-syscalls=true",
"kernel.enable-serial-syscalls=true",
] + zedboot_cmdline_args + board_zedboot_cmdline_args
cmdline_inputs = zedboot_cmdline_files
# XXX(comfoltey): Disable bootfs_allowlist_recovery while build
# unification is in progress
bootfs_allowlist = []
ta_uuids = recovery_ta_uuids
}
assemble_system("recovery-fdr") {
base_packages = recovery_packages
# We avoid compressing blobs in the blobfs image so that they can be more
# effectively compressed by the ZBI compressor that is tuned to zstd max.
compress_blobs = false
netboot = true
devmgr_config = [ "virtcon.disable=true" ]
cmdline = []
# XXX(comfoltey): Disable bootfs_allowlist_recovery while build
# unification is in progress
bootfs_allowlist = []
ta_uuids = recovery_ta_uuids
}
if (is_host) {
host_test_data("test_data") {
out_dir = get_label_info(":anything($target_toolchain)", "target_out_dir")
sources = [
"${out_dir}/recovery-eng.zbi",
"${out_dir}/recovery-fdr.zbi",
]
deps = [
":recovery-eng($target_toolchain)",
":recovery-fdr($target_toolchain)",
]
}
}