| # Copyright 2023 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_sdk//fuchsia:assembly.bzl", |
| "fuchsia_legacy_bundle", |
| "fuchsia_product_bundle", |
| "fuchsia_product_image", |
| ) |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| _LEGACY_AIB_PATH = "@minimal_bundles//:built/artifacts/obj/build/images/fuchsia/fuchsia/legacy" |
| |
| _PLATFORM_AIBS_PATH = "@minimal_bundles//:built/artifacts/obj/bundles/assembly" |
| |
| # Define Legacy AIB |
| fuchsia_legacy_bundle( |
| name = "legacy_aib", |
| directory = _LEGACY_AIB_PATH, |
| files = "@minimal_bundles//:legacy_aib_files", |
| ) |
| |
| # Define platform AIBs |
| fuchsia_legacy_bundle( |
| name = "platform_aibs", |
| directory = _PLATFORM_AIBS_PATH, |
| files = "@minimal_bundles//:platform_aibs_files", |
| ) |
| |
| fuchsia_product_image( |
| name = "test_product.vim3.image", |
| board_config = "//product/board_configuration:vim3", |
| legacy_bundle = ":legacy_aib", |
| platform_artifacts = ":platform_aibs", |
| product_config = "//product/product_configuration:product_config", |
| ) |
| |
| genrule( |
| name = "update_version_file", |
| outs = ["version_file.txt"], |
| cmd = "date +%s > $@", |
| ) |
| |
| fuchsia_product_bundle( |
| name = "test_product.vim3", |
| board_name = "vim3", |
| main = ":test_product.vim3.image", |
| partitions_config = "//product/partition_configuration:vim3", |
| product_bundle_name = "test_product", |
| repository_keys = "//product/keys", |
| update_epoch = "1", |
| update_version_file = ":version_file.txt", |
| ) |