| # 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/images/assemble_system.gni") |
| import("//build/images/zedboot/zedboot_args.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| group("recovery") { |
| testonly = true |
| public_deps = [ |
| ":recovery-eng", |
| ":recovery-fdr", |
| ] |
| } |
| |
| recovery_packages = [ |
| "//build/info:build-info", |
| "//garnet/bin/sysmgr", |
| "//src/connectivity/management:network_config_default", |
| "//src/connectivity/network:config", |
| "//src/connectivity/wlan/config:default", |
| "//src/connectivity/wlan/wlancfg", |
| "//src/connectivity/wlan/wlanstack", |
| "//src/devices/sysmem/bin/sysmem_connector", |
| "//src/recovery/system:system_recovery", |
| "//src/recovery/system:config", |
| "//src/security/root_ssl_certificates", |
| "//src/sys/appmgr", |
| "//src/sys/appmgr:appmgr_scheme_config", |
| "//src/sys/appmgr:component_id_index_no_restrict_storage", |
| "//src/sys/core", |
| "//src/sys/pkg:recovery", |
| "//src/sys/stash:pkg", |
| "//src/sys/time:recovery", |
| ] |
| |
| recovery_system_image_deps = [ "//garnet/packages/prod:broadcom" ] |
| |
| 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", |
| |
| # The SWD stack for OTAs. |
| "//src/sys/pkg/lib/isolated-swd:isolated-swd-components", |
| |
| # Eng allowlists for SWD (for OTAs): |
| "//src/security/policy:appmgr_package_cache_allowlist_eng", |
| "//src/security/policy:appmgr_package_resolver_allowlist_eng", |
| ] |
| |
| assemble_system("recovery-eng") { |
| testonly = true |
| base_packages = recovery_eng_packages |
| |
| system_image_deps = recovery_system_image_deps |
| |
| # 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 |
| ramdisk_fvm_in_zbi = true |
| |
| include_component_id_index = 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", |
| ] |
| |
| bootfs_labels = [ |
| "//build/info:bootfs", |
| "//build/input:recovery_bootfs", |
| "//bundles:bootstrap", |
| "//bundles:debugging", |
| "//bundles/bringup:manual_testing", |
| "//bundles/drivers:bootstrap", |
| "//bundles/drivers:usb-host-stack", |
| "//bundles/drivers:usb-peripheral-stack", |
| "//bundles/drivers:utils", |
| ] |
| bootfs_labels += |
| [ "//src/sys/component_manager:component_manager_bootfs_config" ] |
| |
| sysmgr_golden = "sysmgr-eng-golden.json" |
| |
| metadata = { |
| images = [ |
| { |
| name = "recovery-eng" |
| path = rebase_path("$target_out_dir/recovery-eng.zbi", root_build_dir) |
| type = "zbi" |
| }, |
| ] |
| } |
| } |
| |
| assemble_system("recovery-fdr") { |
| base_packages = recovery_packages |
| |
| system_image_deps = recovery_system_image_deps |
| |
| # 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 |
| ramdisk_fvm_in_zbi = true |
| |
| include_component_id_index = true |
| |
| devmgr_config = [ "virtcon.disable=true" ] |
| cmdline = [] |
| |
| bootfs_labels = [ |
| "//build/info:bootfs", |
| "//build/input:recovery_bootfs", |
| "//bundles:bootstrap", |
| "//bundles/drivers:bootstrap", |
| "//bundles/drivers:usb-host-stack", |
| "//bundles/drivers:usb-peripheral-stack", |
| ] |
| bootfs_labels += |
| [ "//src/sys/component_manager:component_manager_bootfs_config" ] |
| |
| sysmgr_golden = "sysmgr-fdr-golden.json" |
| } |
| |
| 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)", |
| ] |
| } |
| } |