| # 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/drivers.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" ] |
| } |
| } |
| |
| driver_bind_rules("astro-bind") { |
| rules = "astro.bind" |
| bind_output = "astro.bindbc" |
| tests = "bind-tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_bindlib", |
| "//src/devices/bind/fuchsia.google.platform", |
| ] |
| } |
| |
| fuchsia_driver("astro-driver") { |
| output_name = "astro" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "astro-adc.cc", |
| "astro-audio.cc", |
| "astro-backlight.cc", |
| "astro-bluetooth.cc", |
| "astro-buttons.cc", |
| "astro-canvas.cc", |
| "astro-clk.cc", |
| "astro-cpu.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-usb.cc", |
| "astro-video.cc", |
| "astro.cc", |
| ] |
| deps = [ |
| ":astro-bind", |
| "//sdk/banjo/fuchsia.hardware.iommu:fuchsia.hardware.iommu_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.powerimpl:fuchsia.hardware.powerimpl_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.adc:fuchsia.hardware.adc_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.amlogiccanvas:fuchsia.hardware.amlogiccanvas_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.clockimpl:fuchsia.hardware.clockimpl_cpp", |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_cpp", |
| "//sdk/fidl/fuchsia.hardware.gpu.amlogic:fuchsia.hardware.gpu.amlogic_cpp", |
| "//sdk/fidl/fuchsia.hardware.gpu.mali:fuchsia.hardware.gpu.mali_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_cpp", |
| "//sdk/fidl/fuchsia.hardware.power:fuchsia.hardware.power_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_cpp", |
| "//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.sdio:fuchsia.hardware.sdio_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.sdmmc:fuchsia.hardware.sdmmc_cpp", |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_cpp", |
| "//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_cpp", |
| "//sdk/fidl/fuchsia.hardware.tee:fuchsia.hardware.tee_bindlib_cpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp", |
| "//sdk/fidl/fuchsia.hardware.usb.phy:fuchsia.hardware.usb.phy_bindlib_cpp", |
| "//sdk/lib/driver/component/cpp:cpp", |
| "//sdk/lib/driver/outgoing/cpp", |
| "//src/devices/bind/fuchsia:fuchsia_cpp", |
| "//src/devices/bind/fuchsia.adc:fuchsia.adc_cpp", |
| "//src/devices/bind/fuchsia.amlogic.platform:fuchsia.amlogic.platform_cpp", |
| "//src/devices/bind/fuchsia.amlogic.platform.meson:fuchsia.amlogic.platform.meson_cpp", |
| "//src/devices/bind/fuchsia.amlogic.platform.s905d2:fuchsia.amlogic.platform.s905d2_cpp", |
| "//src/devices/bind/fuchsia.ams.platform:fuchsia.ams.platform_cpp", |
| "//src/devices/bind/fuchsia.arm.platform:fuchsia.arm.platform_cpp", |
| "//src/devices/bind/fuchsia.broadcom.platform:fuchsia.broadcom.platform_cpp", |
| "//src/devices/bind/fuchsia.broadcom.platform.sdio:fuchsia.broadcom.platform.sdio_cpp", |
| "//src/devices/bind/fuchsia.clock:fuchsia.clock_cpp", |
| "//src/devices/bind/fuchsia.google.platform:fuchsia.google.platform_cpp", |
| "//src/devices/bind/fuchsia.gpio:fuchsia.gpio_cpp", |
| "//src/devices/bind/fuchsia.i2c:fuchsia.i2c_cpp", |
| "//src/devices/bind/fuchsia.platform:fuchsia.platform_cpp", |
| "//src/devices/bind/fuchsia.power:fuchsia.power_cpp", |
| "//src/devices/bind/fuchsia.pwm:fuchsia.pwm_cpp", |
| "//src/devices/bind/fuchsia.register:fuchsia.register_cpp", |
| "//src/devices/bind/fuchsia.sdio:fuchsia.sdio_cpp", |
| "//src/devices/bind/fuchsia.ti.platform:fuchsia.ti.platform_cpp", |
| "//src/devices/bind/fuchsia.usb.phy:fuchsia.usb.phy_cpp", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/broadcom", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/driver:driver_runtime", |
| "//src/devices/lib/fidl-metadata", |
| "//src/devices/lib/mmio", |
| "//src/devices/lib/thermal", |
| "//src/devices/lib/ti", |
| "//src/devices/usb/lib/usb", |
| "//src/devices/usb/lib/usb:cdc", |
| "//src/devices/usb/lib/usb:dwc2", |
| "//src/lib/ddk", |
| "//src/lib/ddk:ddk-metadata-headers", |
| |
| # TODO(https://fxbug.dev/42113849): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| if (internal_access) { |
| deps += [ ":config-tas2770-copy($shlib_toolchain)" ] |
| include_dirs = [ "$root_out_dir" ] |
| defines = [ "TAS2770_CONFIG_PATH=\"$config_tas2770\"" ] |
| } |
| |
| # TODO(https://fxbug.dev/42176699): This target uses mutable tables which are deprecated, |
| # rather than builders. |
| configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] |
| } |
| |
| fuchsia_driver_component("astro-component") { |
| component_name = "astro" |
| deps = [ ":astro-driver" ] |
| info = "astro-info.json" |
| manifest = "meta/astro.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "astro" |
| driver_components = [ |
| ":astro-component", |
| "post-init", |
| ] |
| } |
| |
| group("astro") { |
| deps = [ |
| ":astro-component", |
| "post-init", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":astro-bind_test", |
| "post-init:tests", |
| ] |
| } |