| # 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") |
| |
| config("factory") { |
| defines = [ "FACTORY_BUILD" ] |
| } |
| |
| config("rndis") { |
| defines = [ "ENABLE_RNDIS=1" ] |
| } |
| |
| bind_rules("sherlock-bind") { |
| rules = "sherlock.bind" |
| output = "sherlock-bind.h" |
| tests = "sherlock-bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| bind_rules("luis-bind") { |
| rules = "luis.bind" |
| output = "luis-bind.h" |
| tests = "luis-bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| template("sherlock_driver") { |
| driver_module(target_name) { |
| forward_variables_from(invoker, "*") |
| |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| if (use_factory) { |
| configs += [ ":factory" ] |
| } |
| if (enable_rndis) { |
| configs += [ ":rndis" ] |
| } |
| |
| sources = [ |
| "luis-cpu.cc", |
| "luis-power.cc", |
| "luis-thermal.cc", |
| "sherlock-audio.cc", |
| "sherlock-backlight.cc", |
| "sherlock-bluetooth.cc", |
| "sherlock-board.cc", |
| "sherlock-buttons.cc", |
| "sherlock-camera.cc", |
| "sherlock-canvas.cc", |
| "sherlock-clk.cc", |
| "sherlock-cpu.cc", |
| "sherlock-display.cc", |
| "sherlock-dsi.cc", |
| "sherlock-emmc.cc", |
| "sherlock-gpio.cc", |
| "sherlock-hevc-enc.cc", |
| "sherlock-i2c.cc", |
| "sherlock-light.cc", |
| "sherlock-mali.cc", |
| "sherlock-nna.cc", |
| "sherlock-ot-radio.cc", |
| "sherlock-pwm.cc", |
| "sherlock-ram.cc", |
| "sherlock-registers.cc", |
| "sherlock-sdio.cc", |
| "sherlock-securemem.cc", |
| "sherlock-spi.cc", |
| "sherlock-sysmem.cc", |
| "sherlock-tee.cc", |
| "sherlock-thermal.cc", |
| "sherlock-thermistor.cc", |
| "sherlock-touch.cc", |
| "sherlock-usb.cc", |
| "sherlock-video-enc.cc", |
| "sherlock-video.cc", |
| "sherlock.cc", |
| ] |
| |
| deps = [ |
| ":luis-bind", |
| ":sherlock-bind", |
| "//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp", |
| "//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:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//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.serial:fuchsia.hardware.serial_c", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/connectivity/openthread/lib/ot-radio", |
| "//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/zircon-internal", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| } |
| |
| sherlock_driver("sherlock") { |
| use_factory = false |
| enable_rndis = false |
| } |
| |
| sherlock_driver("sherlock-factory") { |
| use_factory = true |
| enable_rndis = false |
| } |
| |
| sherlock_driver("sherlock-factory-rndis") { |
| use_factory = true |
| enable_rndis = true |
| } |
| |
| sherlock_driver("luis") { |
| use_factory = false |
| enable_rndis = false |
| defines = [ "IS_LUIS=1" ] |
| } |
| |
| sherlock_driver("luis-factory") { |
| use_factory = true |
| enable_rndis = false |
| defines = [ "IS_LUIS=1" ] |
| } |
| |
| sherlock_driver("luis-factory-rndis") { |
| use_factory = true |
| enable_rndis = true |
| defines = [ "IS_LUIS=1" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":luis-bind_test", |
| ":sherlock-bind_test", |
| ] |
| } |