| # 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. |
| |
| load("@fuchsia_build_info//:args.bzl", "build_info_version") |
| load( |
| "@rules_fuchsia//fuchsia:assembly.bzl", |
| "ARCH", |
| "BUILD_TYPES", |
| "fuchsia_product", |
| "fuchsia_product_bundle", |
| "fuchsia_product_configuration", |
| "fuchsia_virtual_device", |
| ) |
| |
| package(default_visibility = [ |
| "//build/bazel/assembly:__pkg__", |
| ]) |
| |
| fuchsia_virtual_device( |
| name = "microfuchsia_emu_x64", |
| arch = ARCH.X64, |
| device_name = "microfuchsia_emu", |
| memory_quantity = 256, |
| storage_quantity = 0, |
| vsock_cid = 3, |
| vsock_enabled = True, |
| ) |
| |
| fuchsia_virtual_device( |
| name = "microfuchsia_emu_arm64", |
| arch = ARCH.ARM64, |
| device_name = "microfuchsia_emu", |
| memory_quantity = 256, |
| storage_quantity = 0, |
| vsock_cid = 3, |
| vsock_enabled = True, |
| ) |
| |
| fuchsia_product_bundle( |
| name = "product_bundle_eng.x64", |
| default_virtual_device = ":microfuchsia_emu_x64", |
| main = ":microfuchsia_eng.x64", |
| product_bundle_name = "microfuchsia_eng.x64", |
| product_bundle_version = build_info_version, |
| virtual_devices = [ |
| ":microfuchsia_emu_x64", |
| ], |
| ) |
| |
| fuchsia_product_bundle( |
| name = "product_bundle_eng.pkvm-x64", |
| default_virtual_device = ":microfuchsia_emu_x64", |
| main = ":microfuchsia_eng.pkvm-x64", |
| product_bundle_name = "microfuchsia_eng.pkvm-x64", |
| product_bundle_version = build_info_version, |
| virtual_devices = [ |
| ":microfuchsia_emu_x64", |
| ], |
| ) |
| |
| fuchsia_product_bundle( |
| name = "product_bundle_eng.arm64", |
| main = ":microfuchsia_eng.arm64", |
| product_bundle_name = "microfuchsia_eng.arm64", |
| product_bundle_version = build_info_version, |
| ) |
| |
| fuchsia_product_bundle( |
| name = "product_bundle_eng.pkvm-arm64", |
| default_virtual_device = ":microfuchsia_emu_arm64", |
| main = ":microfuchsia_eng.pkvm-arm64", |
| product_bundle_name = "microfuchsia_eng.pkvm-arm64", |
| product_bundle_version = build_info_version, |
| virtual_devices = [ |
| ":microfuchsia_emu_arm64", |
| ], |
| ) |
| |
| fuchsia_product( |
| name = "microfuchsia_eng.x64", |
| board_config = "//boards:x64", |
| platform_artifacts = "//build/bazel/assembly/assembly_input_bundles:platform_eng", |
| product_config = ":assembly_config_eng", |
| ) |
| |
| fuchsia_product( |
| name = "microfuchsia_eng.pkvm-x64", |
| board_config = "//boards:pkvm-x64", |
| platform_artifacts = "//build/bazel/assembly/assembly_input_bundles:platform_eng", |
| product_config = ":assembly_config_eng", |
| ) |
| |
| fuchsia_product( |
| name = "microfuchsia_eng.arm64", |
| board_config = "//boards:arm64", |
| platform_artifacts = "//build/bazel/assembly/assembly_input_bundles:platform_eng", |
| product_config = ":assembly_config_eng", |
| ) |
| |
| fuchsia_product( |
| name = "microfuchsia_eng.pkvm-arm64", |
| board_config = "//boards:pkvm-arm64", |
| platform_artifacts = "//build/bazel/assembly/assembly_input_bundles:platform_eng", |
| product_config = ":assembly_config_eng", |
| ) |
| |
| fuchsia_product_configuration( |
| name = "assembly_config_eng", |
| base_packages = ["//src/microfuchsia/tee/ta/noop:ta-noop"], |
| product_config_json = { |
| "platform": { |
| "build_type": BUILD_TYPES.ENG, |
| "feature_set_level": "embeddable", |
| "paravirtualization": { |
| "enabled": "required", |
| }, |
| "kernel": { |
| # Use a smaller amount of entropy to reduce page table overhead. |
| # TODO(https://fxbug.dev/356417234): Select ASLR value for this configuration. |
| "aslr_entropy_bits": 8, |
| |
| # The kernel's OOM monitoring mechanism does not work well with a "machine" (VM) |
| # that has tens of MB of headroom. Disable until we have a chance to tune it. |
| # TODO(https://fxbug.dev/337041626): Define OOM policy for this configuration. |
| "oom": { |
| "behavior": "disable", |
| }, |
| }, |
| "development_support": { |
| "vsock_development": True, |
| "include_bin_clock": False, |
| }, |
| "storage": { |
| "filesystems": { |
| "image_mode": "no_image", |
| }, |
| }, |
| "diagnostics": { |
| "archivist": "low-mem", |
| }, |
| }, |
| "product": { |
| "trusted_apps": [ |
| { |
| "component_url": "fuchsia-pkg://fuchsia.com/ta-noop#meta/ta-runtime.cm", |
| "guid": "185d0391-bb47-495a-ba57-d6c6b808bfae", |
| "ta_type": "GlobalPlatform", |
| }, |
| ], |
| }, |
| }, |
| version = build_info_version, |
| ) |