blob: 5565afd1297534b2bf13b2138554f0e0a0e1c4b7 [file] [log] [blame]
# Copyright 2017 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("//build/dist/resource.gni")
import("//src/sys/build/components.gni")
bind_rules("bt_hci_intel_bind") {
rules = "bt_hci_intel.bind"
output = "bt_hci_intel-bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.bluetooth",
"//src/devices/bind/fuchsia.usb",
]
}
group("tests") {
testonly = true
deps = [ ":bt_hci_intel_bind_test" ]
}
driver_module("driver") {
output_name = "bt-hci-intel"
sources = [
"device.cc",
"device.h",
"driver.cc",
"firmware_loader.cc",
"firmware_loader.h",
"logging.h",
"vendor_hci.cc",
"vendor_hci.h",
]
deps = [
":bt_hci_intel_bind",
"//sdk/banjo/fuchsia.hardware.usb",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c",
"//sdk/lib/syslog/cpp:backend_legacy",
"//src/connectivity/bluetooth/core/bt-host/hci",
"//src/connectivity/bluetooth/core/bt-host/hci-spec",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
]
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
}
if (internal_access) {
resource("btintel-firmware") {
sources = [
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-11-5.sfi",
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-12-16.sfi",
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-17-2.sfi",
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-18-2.sfi",
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq",
"//prebuilt/connectivity/bluetooth/firmware/intel/ibt-hw-37.8.bseq",
]
outputs = [ "lib/firmware/{{source_file_part}}" ]
}
}
fuchsia_system_package("intel") {
deps = [ ":driver" ]
if (internal_access) {
deps += [ ":btintel-firmware($shlib_toolchain)" ]
}
# This package is reachable from //garnet/packages/prod:all
allowed_in_extra_deps = true
}