| # Copyright 2020 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/bind/bind.gni") |
| import("//build/drivers.gni") |
| import("//build/test.gni") |
| |
| driver_bind_rules("virtio_rng_bind") { |
| rules = "meta/virtio_rng.bind" |
| tests = "meta/tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.pci:fuchsia.hardware.pci_bindlib", |
| "//src/devices/bind/fuchsia.acpi", |
| "//src/devices/bind/fuchsia.pci", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":virtio_rng_bind_test" ] |
| } |
| |
| fuchsia_cc_driver("virtio_rng-driver") { |
| legacy = true |
| output_name = "virtio_rng" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "rng.cc", |
| "rng_driver.cc", |
| ] |
| deps = [ |
| ":virtio_rng_bind", |
| "//src/devices/bus/lib/virtio:virtio-dfv1", |
| "//src/devices/lib/driver", |
| "//src/lib/ddktl", |
| ] |
| } |
| |
| fuchsia_driver_component("virtio_rng") { |
| info = "meta/virtio_rng-info.json" |
| component_name = "virtio_rng" |
| manifest = "meta/virtio_rng.cml" |
| deps = [ ":virtio_rng-driver" ] |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "virtio_rng" |
| driver_components = [ ":virtio_rng" ] |
| } |