| # 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/images/args.gni") |
| import("//build/images/paths.gni") |
| |
| # A list of partitions for the flash json manifest that will be |
| # generated. The first item should be the partition name and the |
| # second should be the path to the image for the partition. |
| parts = [] |
| if (zircon_a_partition != "") { |
| parts += [ |
| { |
| name = zircon_a_partition |
| path = rebase_path(files.final_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (zircon_b_partition != "") { |
| parts += [ |
| { |
| name = zircon_b_partition |
| path = rebase_path(files.final_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (zircon_r_partition != "") { |
| parts += [ |
| { |
| name = zircon_r_partition |
| path = rebase_path(files.recovery_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_a_partition != "") { |
| parts += [ |
| { |
| name = vbmeta_a_partition |
| path = rebase_path(files.final_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_b_partition != "") { |
| parts += [ |
| { |
| name = vbmeta_b_partition |
| path = rebase_path(files.final_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_r_partition != "") { |
| parts += [ |
| { |
| name = vbmeta_r_partition |
| path = rebase_path(files.recovery_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| |
| recovery_parts = [] |
| if (zircon_a_partition != "") { |
| recovery_parts += [ |
| { |
| name = zircon_a_partition |
| path = rebase_path(files.recovery_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (zircon_b_partition != "") { |
| recovery_parts += [ |
| { |
| name = zircon_b_partition |
| path = rebase_path(files.recovery_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (zircon_r_partition != "") { |
| recovery_parts += [ |
| { |
| name = zircon_r_partition |
| path = rebase_path(files.recovery_zbi, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_a_partition != "") { |
| recovery_parts += [ |
| { |
| name = vbmeta_a_partition |
| path = rebase_path(files.recovery_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_b_partition != "") { |
| recovery_parts += [ |
| { |
| name = vbmeta_b_partition |
| path = rebase_path(files.recovery_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| if (vbmeta_r_partition != "") { |
| recovery_parts += [ |
| { |
| name = vbmeta_r_partition |
| path = rebase_path(files.recovery_vbmeta, root_build_dir) |
| }, |
| ] |
| } |
| |
| archive_image_suffix = "zbi" |
| if (custom_signing_script != "" || use_vboot) { |
| archive_image_suffix = "signed.zbi.signed" |
| } |
| |
| archive_image = "zircon-a.${archive_image_suffix}" |
| archive_vbmeta = "zircon-a.vbmeta" |
| |
| archive_recovery_image = "zircon-r.zbi" |
| if (recovery_is_zedboot) { |
| archive_recovery_image = "zircon-r.${archive_image_suffix}" |
| } |
| |
| archive_recovery_vbmeta = "zircon-r.vbmeta" |
| |
| # A list of partitions for the flash json manifest that will be |
| # generated. The first item should be the partition name and the |
| # second should be the path to the image for the partition. |
| archive_parts = [ |
| { |
| name = zircon_a_partition |
| path = archive_image |
| }, |
| { |
| name = zircon_b_partition |
| path = archive_image |
| }, |
| { |
| name = zircon_r_partition |
| path = archive_recovery_image |
| }, |
| { |
| name = vbmeta_a_partition |
| path = archive_vbmeta |
| }, |
| { |
| name = vbmeta_b_partition |
| path = archive_vbmeta |
| }, |
| { |
| name = vbmeta_r_partition |
| path = archive_recovery_vbmeta |
| }, |
| ] |
| |
| archive_recovery_parts = [ |
| { |
| name = zircon_a_partition |
| path = archive_recovery_image |
| }, |
| { |
| name = zircon_b_partition |
| path = archive_recovery_image |
| }, |
| { |
| name = zircon_r_partition |
| path = archive_recovery_image |
| }, |
| { |
| name = vbmeta_a_partition |
| path = archive_recovery_vbmeta |
| }, |
| { |
| name = vbmeta_b_partition |
| path = archive_recovery_vbmeta |
| }, |
| { |
| name = vbmeta_r_partition |
| path = archive_recovery_vbmeta |
| }, |
| ] |