| # Copyright 2022 The Fuchsia Authors. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/assembly/product_assembly_configuration.gni") |
| import("//build/bazel/assembly/bazel_product_bundle.gni") |
| |
| assert( |
| is_fuchsia, |
| "Product definitions and assemblies should only be defined in the fuchsia toolchain") |
| |
| group("products") { |
| testonly = true |
| deps = [] |
| if (current_cpu == "x64") { |
| deps += [ ":product_bundle.x64_product_config" ] |
| } else if (current_cpu == "arm64") { |
| deps += [ ":product_bundle.arm64_product_config" ] |
| } else if (current_cpu == "riscv64") { |
| deps += [ ":product_bundle.riscv64_product_config" ] |
| } |
| } |
| |
| group("minimal") { |
| testonly = true |
| if (current_cpu == "x64") { |
| deps = [ ":product_bundle.x64" ] |
| } else if (current_cpu == "arm64") { |
| deps = [ |
| ":product_bundle.arm64", |
| ":product_bundle.vim3", |
| ] |
| } else if (current_cpu == "riscv64") { |
| deps = [ ":product_bundle.riscv64" ] |
| } |
| } |
| |
| if (current_cpu == "x64") { |
| bazel_product_bundle("product_bundle.x64") { |
| testonly = true |
| product_bundle_name = "minimal.x64" |
| allow_eng_platform_bundle_use = true |
| bazel_product_bundle_target = ":product_bundle.x64" |
| bazel_product_image_target = ":image.x64" |
| bazel_product_config_target = ":product_config" |
| bazel_product_config_name = "minimal" |
| bazel_recovery_image_target = "//products/zedboot:x64" |
| bazel_elf_sizes_target = ":elf_sizes.x64" |
| bazel_inputs_from_gn = [ "//boards/x64:x64.bazel_input" ] |
| } |
| } |
| |
| if (current_cpu == "arm64") { |
| bazel_product_bundle("product_bundle.arm64") { |
| testonly = true |
| product_bundle_name = "minimal.arm64" |
| allow_eng_platform_bundle_use = true |
| bazel_product_bundle_target = ":product_bundle.arm64" |
| bazel_product_image_target = ":image.arm64" |
| bazel_product_config_target = ":product_config" |
| bazel_product_config_name = "minimal" |
| bazel_recovery_image_target = "//products/zedboot:arm64" |
| bazel_elf_sizes_target = ":elf_sizes.arm64" |
| bazel_inputs_from_gn = [ "//boards/arm64:arm64.bazel_input" ] |
| } |
| |
| bazel_product_bundle("product_bundle.vim3") { |
| testonly = true |
| product_bundle_name = "minimal.vim3" |
| allow_eng_platform_bundle_use = true |
| bazel_product_bundle_target = ":product_bundle.vim3" |
| bazel_product_image_target = ":image.vim3" |
| bazel_recovery_image_target = "//products/zedboot:vim3_recovery" |
| bazel_elf_sizes_target = ":elf_sizes.vim3" |
| bazel_inputs_from_gn = [ "//boards/vim3:bazel_inputs" ] |
| } |
| |
| bazel_product_bundle("product_bundle.emac") { |
| testonly = true |
| product_bundle_name = "minimal.emac" |
| allow_eng_platform_bundle_use = true |
| bazel_product_bundle_target = ":product_bundle.emac" |
| bazel_product_image_target = ":image.emac" |
| bazel_elf_sizes_target = ":elf_sizes.emac" |
| bazel_inputs_from_gn = |
| [ "//src/devices/board/drivers/vim3-devicetree:vim3-dtb" ] |
| } |
| } |
| |
| if (current_cpu == "riscv64") { |
| bazel_product_bundle("product_bundle.riscv64") { |
| testonly = true |
| product_bundle_name = "minimal.riscv64" |
| allow_eng_platform_bundle_use = true |
| image_use_vbmeta = false |
| bazel_product_bundle_target = ":product_bundle.riscv64" |
| bazel_product_image_target = ":image.riscv64" |
| bazel_product_config_target = ":product_config" |
| bazel_product_config_name = "minimal" |
| bazel_recovery_image_target = "//products/zedboot:riscv64" |
| bazel_elf_sizes_target = ":elf_sizes.riscv64" |
| bazel_inputs_from_gn = [ "//boards/riscv64:riscv64.bazel_input" ] |
| } |
| } |
| |
| group("devicetree") { |
| deps = [] |
| if (current_cpu == "arm64") { |
| deps += [ |
| # Include the vim3 devicetree blob. This is used in RTC driver repo. |
| "//src/devices/board/drivers/vim3-devicetree:vim3.assembly_inputs", |
| ] |
| } |
| } |