| # 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/components.gni") |
| import("//build/drivers.gni") |
| import("//build/test.gni") |
| |
| driver_bind_rules("aml-cpu-legacy-bind") { |
| rules = "aml-cpu-legacy.bind" |
| bind_output = "aml-cpu-legacy.bindbc" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.thermal", |
| ] |
| } |
| |
| fuchsia_driver("aml-cpu-legacy-driver") { |
| output_name = "aml-cpu-legacy" |
| defines = [ "_ALL_SOURCE" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| sources = [ "aml-cpu.cc" ] |
| deps = [ |
| ":aml-cpu-legacy-bind", |
| "//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_cpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp", |
| "//sdk/lib/fidl", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/inspect", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| # TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_driver_component("aml-cpu-legacy") { |
| component_name = "aml-cpu-legacy" |
| deps = [ ":aml-cpu-legacy-driver" ] |
| info = "aml-cpu-legacy-info.json" |
| manifest = "meta/aml-cpu-legacy.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "aml-cpu-legacy" |
| driver_components = [ ":aml-cpu-legacy" ] |
| } |
| |
| test("aml-cpu-legacy-test-bin") { |
| sources = [ |
| "aml-cpu-test.cc", |
| "aml-cpu.cc", |
| ] |
| output_name = "aml-cpu-legacy-test" |
| deps = [ |
| ":aml-cpu-legacy-bind", |
| "//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_cpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp", |
| "//sdk/lib/async_patterns/testing/cpp", |
| "//sdk/lib/component/outgoing/cpp", |
| "//sdk/lib/fidl", |
| "//sdk/lib/inspect/testing/cpp:zxtest", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/testing/fake-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/mmio", |
| "//src/devices/testing/fake-mmio-reg", |
| "//src/devices/testing/mock-ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/mock-function", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| |
| # TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_unittest_package("aml-cpu-legacy-test") { |
| deps = [ ":aml-cpu-legacy-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml-cpu-legacy-bind_test", |
| ":aml-cpu-legacy-test", |
| ] |
| } |