blob: 3a61a558381ef6acb360b6116efa33a070fa5887 [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/driver_package.gni")
bind_rules("bind") {
rules = "bt_hci_intel.bind"
output = "bt_hci_intel-bind.h"
deps = [
"//src/devices/bind/deprecated.bluetooth",
"//src/devices/bind/deprecated.usb",
]
}
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 = [
":bind",
"//sdk/banjo/ddk.protocol.usb",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c",
"//src/connectivity/bluetooth/core/bt-host/gap",
"//src/connectivity/bluetooth/core/bt-host/hci",
"//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:no_cpp_standard_library" ]
configs += [
"//build/config/fuchsia:enable_zircon_asserts",
"//build/config/fuchsia:static_cpp_standard_library",
]
}
if (internal_access) {
copy("btintel-firmware") {
sources = [
"firmware/ibt-11-5.sfi",
"firmware/ibt-12-16.sfi",
"firmware/ibt-18-2.sfi",
"firmware/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq",
"firmware/ibt-hw-37.8.bseq",
]
outputs = [ "$root_out_dir/firmware/{{source_file_part}}" ]
}
}
driver_package("intel") {
deps = [ ":driver" ]
drivers = [
{
name = "bt-hci-intel.so"
},
]
if (internal_access) {
deps += [
# The copy step has to be in the shared-library toolchain to use the
# expected output directory, since we treat firmware blobs as if they
# were libraries which always use the shared-library toolchain to build.
":btintel-firmware($shlib_toolchain)",
]
libraries = [
{
name = "firmware/ibt-11-5.sfi"
},
{
name = "firmware/ibt-12-16.sfi"
},
{
name = "firmware/ibt-18-2.sfi"
},
{
name = "firmware/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq"
},
{
name = "firmware/ibt-hw-37.8.bseq"
},
]
}
}