| # 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") |
| import("//src/sys/build/components.gni") |
| |
| if (internal_access) { |
| config_tas5805m = "audio/config/tas5805m_config.h" |
| } |
| |
| fuchsia_system_package("nelson") { |
| deps = [ ":nelson-module" ] |
| |
| if (internal_access) { |
| deps += [ ":config-tas5805" ] |
| } |
| } |
| |
| if (internal_access) { |
| resource("config-tas5805") { |
| sources = [ "//prebuilt/$config_tas5805m" ] |
| outputs = [ "lib/$config_tas5805m" ] |
| } |
| } |
| |
| bind_rules("nelson-bind") { |
| rules = "nelson.bind" |
| output = "nelson-bind.h" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("nelson-module") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "nelson-audio.cc", |
| "nelson-backlight.cc", |
| "nelson-bluetooth.cc", |
| "nelson-buttons.cc", |
| "nelson-canvas.cc", |
| "nelson-clk.cc", |
| "nelson-cpu.cc", |
| "nelson-display.cc", |
| "nelson-dsi.cc", |
| "nelson-emmc.cc", |
| "nelson-gpio.cc", |
| "nelson-i2c.cc", |
| "nelson-light.cc", |
| "nelson-mali.cc", |
| "nelson-nna.cc", |
| "nelson-power.cc", |
| "nelson-pwm.cc", |
| "nelson-ram.cc", |
| "nelson-registers.cc", |
| "nelson-sdio.cc", |
| "nelson-securemem.cc", |
| "nelson-selina.cc", |
| "nelson-spi.cc", |
| "nelson-sysmem.cc", |
| "nelson-tee.cc", |
| "nelson-thermal.cc", |
| "nelson-thermistor.cc", |
| "nelson-touch.cc", |
| "nelson-usb.cc", |
| "nelson-video.cc", |
| "nelson.cc", |
| ] |
| deps = [ |
| ":nelson-bind", |
| "//sdk/banjo/fuchsia.hardware.clockimpl", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp", |
| "//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.sdmmc", |
| "//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) { |
| include_dirs = [ "//prebuilt" ] |
| defines = [ "TAS5805M_CONFIG_PATH=\"$config_tas5805m\"" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":nelson-bind_test" ] |
| } |