| # Copyright 2024 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/bazel/assembly/bazel_product_bundle.gni") |
| |
| # A GN target to perform system assembly in Bazel exclusively, using |
| # Ninja-generated inputs. |
| |
| assert(current_toolchain == default_toolchain, |
| "Products only make sense in the context of the default toolchain") |
| |
| # For boards with x64 architecture, we always use the x64 board. |
| # For boards with arm64 architecture, we always use the arm64 board. |
| board_name = target_cpu |
| |
| group("products") { |
| testonly = true |
| deps = [ ":microfuchsia_eng.${board_name}_product_config" ] |
| } |
| |
| group("microfuchsia") { |
| testonly = true |
| if (target_cpu == "x64" || target_cpu == "arm64") { |
| deps = [ |
| ":microfuchsia_eng.${board_name}", |
| ":microfuchsia_eng.pkvm-${board_name}", |
| ] |
| } |
| } |
| |
| if (target_cpu == "x64" || target_cpu == "arm64") { |
| bazel_product_bundle("microfuchsia_eng.${board_name}") { |
| testonly = true |
| allow_eng_platform_bundle_use = true |
| image_has_fxfs_blob = false |
| image_has_fvm = false |
| product_bundle_name = target_name |
| bazel_product_bundle_target = |
| "//products/microfuchsia:product_bundle_eng.${board_name}" |
| bazel_product_image_target = |
| "//products/microfuchsia:microfuchsia_eng.${board_name}" |
| bazel_product_config_target = "//products/microfuchsia:assembly_config_eng" |
| bazel_product_config_name = "microfuchsia_eng" |
| bazel_recovery_image_target = "//products/zedboot:${board_name}" |
| bazel_inputs_from_gn = [ |
| "//src/microfuchsia/tee/ta/noop:ta-noop_for_bazel", |
| "//boards/${board_name}:${board_name}.bazel_input", |
| ] |
| } |
| |
| bazel_product_bundle("microfuchsia_eng.pkvm-${board_name}") { |
| testonly = true |
| allow_eng_platform_bundle_use = true |
| image_has_fxfs_blob = false |
| image_has_fvm = false |
| image_use_vbmeta = false |
| product_bundle_name = target_name |
| generate_product_bundle_metadata = true |
| bazel_product_bundle_target = |
| "//products/microfuchsia:product_bundle_eng.pkvm-${board_name}" |
| bazel_product_image_target = |
| "//products/microfuchsia:microfuchsia_eng.pkvm-${board_name}" |
| bazel_inputs_from_gn = [ |
| "//boards/pkvm:bazel_inputs", |
| "//src/microfuchsia/tee/ta/noop:ta-noop_for_bazel", |
| ] |
| } |
| } |