| # Copyright 2019 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| group("platform") { |
| deps = [ |
| ":platform-bus", |
| ":platform-bus.proxy", |
| ] |
| } |
| |
| bind_rules("platform-bus-bind") { |
| output = "platform-bus-bind.h" |
| disable_autobind = true |
| } |
| |
| driver_module("platform-bus") { |
| sources = [ |
| "cpu-trace.cc", |
| "device-resources.cc", |
| "platform-bus.cc", |
| "platform-device.cc", |
| ] |
| deps = [ |
| ":platform-bus-bind", |
| "//sdk/banjo/ddk.protocol.clockimpl", |
| "//sdk/banjo/ddk.protocol.gpio", |
| "//sdk/banjo/ddk.protocol.gpioimpl", |
| "//sdk/banjo/ddk.protocol.iommu", |
| "//sdk/banjo/ddk.protocol.platform.bus", |
| "//sdk/banjo/ddk.protocol.platform.device", |
| "//sdk/banjo/ddk.protocol.powerimpl", |
| "//sdk/banjo/ddk.protocol.sysmem", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp", |
| "//sdk/lib/fdio", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| driver_module("platform-bus.proxy") { |
| sources = [ "platform-proxy.cc" ] |
| deps = [ |
| ":platform-bus-bind", |
| "//sdk/banjo/ddk.protocol.platform.device", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| test("platform-bus-unittest") { |
| sources = [ |
| "cpu-trace.cc", |
| "device-resources.cc", |
| "platform-bus-unittest.cc", |
| "platform-bus.cc", |
| "platform-device.cc", |
| ] |
| deps = [ |
| ":platform-bus-bind", |
| "//sdk/banjo/ddk.protocol.clockimpl", |
| "//sdk/banjo/ddk.protocol.gpio", |
| "//sdk/banjo/ddk.protocol.gpioimpl", |
| "//sdk/banjo/ddk.protocol.iommu", |
| "//sdk/banjo/ddk.protocol.platform.bus", |
| "//sdk/banjo/ddk.protocol.platform.device", |
| "//sdk/banjo/ddk.protocol.powerimpl", |
| "//sdk/banjo/ddk.protocol.sysmem", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp", |
| "//sdk/lib/fdio", |
| "//src/devices/lib/driver", |
| "//src/devices/testing/fake-bti", |
| "//src/devices/testing/no_ddk", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("platform-bus-unittest-package") { |
| package_name = "platform-bus-unittest" |
| executable_path = "test/platform-bus-unittest" |
| deps = [ ":platform-bus-unittest" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":platform-bus-unittest-package", |
| "test:platform-bus-bti-test", |
| "test:platform-bus-test", |
| ] |
| } |