blob: 91393028cc6d3fb3ade0e4219f7920c58f4f5a91 [file]
# Copyright 2024 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/components/fuchsia_component.gni")
import("//build/components/fuchsia_package.gni")
import("//build/dist/resource.gni")
# Creates a component and package containing configuration data for the TA manager.
# Produces a package named "${target_name}" with a configuration component
# named "${target_name}" that exposes a capability named "config" that must
# be routed to the TA manager component.
#
# Parameters:
#
# config_sources
# - Required: list of paths to config files
template("ta_manager_config") {
base_name = target_name
if (defined(invoker.base_name)) {
base_name = invoker.base_name
}
config_resource_target = "${target_name}_resource"
config_component_target = "${target_name}_component"
config_component_name = base_name
config_package_target = "${target_name}"
config_package_name = base_name
resource(config_resource_target) {
sources = invoker.config_sources
outputs = [ "data/config/{{source_file_part}} " ]
}
fuchsia_component(config_component_target) {
component_name = config_component_name
manifest = "//src/microfuchsia/tee/manager/meta/ta-manager-config.cml"
}
fuchsia_package(config_package_target) {
package_name = config_package_name
deps = [
":${config_component_target}",
":${config_resource_target}",
]
}
}