| # 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/config/fuchsia/rules.gni") |
| import("//build/unification/firmware.gni") |
| import("//build/unification/images/migrated_manifest.gni") |
| |
| # TODO: test_driver? |
| driver_module("flash-programmer") { |
| defines = [ "_ALL_SOURCE" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| testonly = false |
| sources = [ "flash-programmer.cc" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.usb", |
| "//sdk/banjo/ddk.protocol.usb.composite", |
| "//sdk/banjo/ddk.protocol.usb.request", |
| "//sdk/fidl/fuchsia.hardware.usb.fwloader:fuchsia.hardware.usb.fwloader_c", |
| "//src/devices/lib/driver", |
| "//src/devices/usb/lib/usb", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/system/fidl/fuchsia-mem:c", |
| ] |
| data_deps = [ ":fx3-firmware" ] |
| } |
| |
| firmware("fx3-firmware") { |
| sources = [ "fx3-boot/Fx3BootAppGcc.img" ] |
| } |
| |
| migrated_manifest("flash-programmer-manifest") { |
| deps = [ ":flash-programmer" ] |
| } |