| # 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/assembly/assembled_system.gni") |
| import("//build/assembly/product_assembly_configuration.gni") |
| import("//build/assembly/sshd_config.gni") |
| import("//build/board.gni") |
| import("//build/images/args.gni") |
| import("//build/images/paths.gni") |
| import("//build/images/vboot/vboot.gni") |
| import("//build/info/info.gni") |
| import("//build/product.gni") |
| import("//build/testing/host_test_data.gni") |
| import("//src/storage/fshost/generated_fshost_config.gni") |
| import("//src/sys/core/build/core.gni") |
| |
| if (is_host) { |
| host_test_data("test_data") { |
| out_dir = get_label_info(":anything($target_toolchain)", "target_out_dir") |
| sources = [ "${out_dir}/recovery-fdr/fuchsia.zbi" ] |
| deps = [ ":recovery-fdr($target_toolchain)" ] |
| } |
| } |
| |
| if (is_fuchsia) { |
| assert(current_toolchain == default_toolchain, |
| "//build/images/* are only valid in the Fuchsia toolchain") |
| assert(!bootfs_only, |
| "The recovery image is only valid for products other than bringup.") |
| |
| group("recovery") { |
| testonly = true |
| public_deps = [ ":recovery-fdr" ] |
| } |
| |
| product_assembly_configuration("for-fdr") { |
| platform = { |
| build_type = "eng" |
| feature_set_level = "utility" |
| graphics = { |
| enable_virtual_console = false |
| } |
| recovery = { |
| system_recovery = "fdr" |
| instructions = rebase_path("//src/recovery/system/res/instructions.txt", |
| root_build_dir) |
| check_for_managed_mode = true |
| } |
| |
| # Use the same data filesystem format as the "main" product assembly. The default is fxfs, so |
| # this only needs to be set if it's not that. |
| if (!fxfs_blob) { |
| storage = { |
| filesystems = { |
| volume = { |
| fvm = { |
| data = { |
| data_filesystem_format = data_filesystem_format |
| } |
| blob = { |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| |
| assembled_system("recovery-fdr") { |
| image_name = "fuchsia" |
| namespace = "recovery-fdr" |
| |
| testonly = true |
| allow_eng_platform_bundle_use = true |
| |
| ramdisk_in_zbi = true |
| |
| base_packages = board_recovery_package_labels |
| |
| product_assembly_config_label = ":for-fdr" |
| board_config_label = recovery_board_configuration_label |
| |
| # Use the same filesystem settings as the "main" product assembly. |
| generate_fxfs = fxfs_blob |
| generate_fvm = !fxfs_blob |
| |
| # The following are set to match the board's configuration |
| generate_vbmeta = use_vbmeta |
| |
| if (custom_signing_script != "") { |
| inputs = custom_signing_script_inputs |
| generate_signed_zbi = true |
| } else if (use_vboot) { |
| inputs = vboot_action.inputs |
| generate_signed_zbi = true |
| } |
| } |
| } |