| # 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") |
| assert(target_cpu == "x64" || target_cpu == "arm64", |
| "Microfuchsia is only support for x64 and arm64") |
| |
| bazel_product_bundle("microfuchsia_eng.${target_cpu}") { |
| 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.${target_cpu}" |
| bazel_product_image_target = |
| "//products/microfuchsia:microfuchsia_eng.${target_cpu}" |
| bazel_recovery_image_target = "//products/zedboot:${target_cpu}" |
| bazel_inputs_from_gn = [ |
| "//build/images/flash:esp.bazel_input", |
| "//build/images/zedboot:zedboot.bazel_legacy_aib", |
| "//src/tee/ta/noop:ta-noop_for_bazel", |
| |
| # Add the board configuration as a dependency via the GN arg, as vendor- |
| # repo boards can shadow the ones in //boards. |
| get_label_info(board_configuration_label, "label_no_toolchain") + |
| ".bazel_input", |
| ] |
| } |
| |
| if (target_cpu == "x64" || target_cpu == "arm64") { |
| board = "pkvm-${target_cpu}" |
| |
| bazel_product_bundle("microfuchsia_eng.${board}") { |
| 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 |
| bazel_product_bundle_target = |
| "//products/microfuchsia:product_bundle_eng.${board}" |
| bazel_product_image_target = |
| "//products/microfuchsia:microfuchsia_eng.${board}" |
| bazel_inputs_from_gn = [ |
| "//build/images/flash:esp.bazel_input", |
| "//boards/pkvm:${target_cpu}.bazel_input", |
| "//src/tee/ta/noop:ta-noop_for_bazel", |
| ] |
| } |
| } |