| # 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/cipd.gni") |
| import("//build/config/fuchsia/rules.gni") |
| |
| if (internal_access) { |
| config_tas2770 = "audio/config/tas2770/tas2770_config.h" |
| copy("config-tas2770-copy") { |
| sources = [ "//prebuilt/$config_tas2770" ] |
| outputs = [ "$root_out_dir/$config_tas2770" ] |
| } |
| } |
| |
| bind_rules("astro-bind") { |
| rules = "astro.bind" |
| output = "astro-bind.h" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("astro") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "astro-audio.cc", |
| "astro-backlight.cc", |
| "astro-bluetooth.cc", |
| "astro-buttons.cc", |
| "astro-canvas.cc", |
| "astro-clk.cc", |
| "astro-cpu.cc", |
| "astro-display.cc", |
| "astro-dsi.cc", |
| "astro-gpio.cc", |
| "astro-i2c.cc", |
| "astro-light.cc", |
| "astro-mali.cc", |
| "astro-power.cc", |
| "astro-pwm.cc", |
| "astro-ram.cc", |
| "astro-rawnand.cc", |
| "astro-registers.cc", |
| "astro-sdio.cc", |
| "astro-securemem.cc", |
| "astro-sysmem.cc", |
| "astro-tee.cc", |
| "astro-thermal.cc", |
| "astro-thermistor.cc", |
| "astro-touch.cc", |
| "astro-usb.cc", |
| "astro-video.cc", |
| "astro.cc", |
| ] |
| deps = [ |
| ":astro-bind", |
| "//sdk/banjo/fuchsia.hardware.clockimpl", |
| "//sdk/banjo/fuchsia.hardware.gpio", |
| "//sdk/banjo/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.iommu", |
| "//sdk/banjo/fuchsia.hardware.platform.bus", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.powerimpl", |
| "//sdk/banjo/fuchsia.hardware.serial", |
| "//sdk/banjo/fuchsia.sysmem", |
| "//sdk/fidl/fuchsia.hardware.gpu.amlogic:fuchsia.hardware.gpu.amlogic_llcpp", |
| "//sdk/fidl/fuchsia.hardware.light:fuchsia.hardware.light_c", |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_c", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/devices/bind/fuchsia.ams.platform:bind.fuchsia.ams.platform", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/broadcom", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/focaltech", |
| "//src/devices/lib/metadata:llcpp", |
| "//src/devices/lib/mmio", |
| "//src/devices/lib/thermal", |
| "//src/devices/lib/ti", |
| "//src/devices/usb/lib/usb", |
| "//src/graphics/display/lib/device-protocol-display", |
| "//src/lib/ddk", |
| "//src/lib/ddk:ddk-metadata-headers", |
| |
| # 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/hwreg", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| ] |
| if (internal_access) { |
| deps += [ ":config-tas2770-copy($shlib_toolchain)" ] |
| include_dirs = [ "$root_out_dir" ] |
| defines = [ "TAS2770_CONFIG_PATH=\"$config_tas2770\"" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":astro-bind_test" ] |
| } |