blob: fab28c3c29d017fd51774a44078354a647c01da9 [file] [log] [blame]
# Copyright 2021 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/components.gni")
import("//build/dist/component_manifest_resources.gni")
import("//build/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [
":vboot-fwparam-unittests",
"client:tests",
]
}
rustc_binary("bin") {
output_name = "vboot-fwparam"
with_unit_tests = true
configs += [ "//build/config/rust:bootfs" ]
configs -= [ "//build/config/rust:allow_unused_results" ]
deps = [
"//garnet/lib/rust/files_async",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.acpi.chromeos:fuchsia.acpi.chromeos-rustc",
"//sdk/fidl/fuchsia.device:fuchsia.device-rustc",
"//sdk/fidl/fuchsia.hardware.nvram:fuchsia.hardware.nvram-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//sdk/fidl/fuchsia.nand.flashmap:fuchsia.nand.flashmap-rustc",
"//sdk/fidl/fuchsia.vboot:fuchsia.vboot-rustc",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-runtime",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
]
sources = [
"src/error.rs",
"src/main.rs",
"src/nvdata.rs",
"src/nvdata/fields.rs",
"src/nvdata/flash.rs",
]
}
component_manifest_resources("manifest") {
sources = [ "meta/vboot-fwparam.cml" ]
}
fuchsia_component("component") {
component_name = "vboot-fwparam"
manifest = "meta/vboot-fwparam.cml"
deps = [ ":bin" ]
}
fuchsia_package("vboot-fwparam") {
deps = [ ":component" ]
}
group("bootfs") {
deps = [
":bin",
":manifest",
]
}
fuchsia_unittest_package("vboot-fwparam-unittests") {
deps = [ ":bin_test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}