blob: c7d15f70e8de7ac03c711751dd6871638b498c9b [file] [log] [blame]
# 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")
import("//build/drivers/fuchsia_driver_component.gni")
import("//build/test.gni")
import("//build/testing/bootfs_test.gni")
driver_bind_rules("ram-nand-bind") {
rules = "ram-nand.bind"
header_output = "ram-nand-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.platform" ]
}
driver_module("ram-nand-driver") {
output_name = "ram-nand"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [
"bind.cc",
"ram-nand-ctl.cc",
"ram-nand-ctl.h",
]
deps = [
":common",
":ram-nand-bind",
"//sdk/banjo/fuchsia.hardware.nand:fuchsia.hardware.nand_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.nand:fuchsia.hardware.nand_llcpp",
"//src/devices/lib/driver",
"//src/devices/lib/nand",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
]
}
fuchsia_driver_component("ram-nand") {
component_name = "ram-nand"
deps = [ ":ram-nand-driver" ]
}
source_set("common") {
visibility = [ ":*" ]
sources = [ "ram-nand.cc" ]
deps = [
"//sdk/banjo/fuchsia.hardware.nand:fuchsia.hardware.nand_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.nand:fuchsia.hardware.nand_llcpp",
"//src/lib/ddk",
"//src/lib/ddk:ddk-metadata-headers",
"//src/lib/ddktl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
# TODO(fxb/38132): Migrate to the new bind rules and delete the below
"//src/lib/ddk:ddk-deprecated-binding-headers",
]
public_deps = [ "//zircon/system/ulib/fbl" ]
}
test("ram-nand-test") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "ram-nand-test"
sources = [
"test/ram-nand-ctl.cc",
"test/ram-nand.cc",
]
include_dirs = [ "." ]
deps = [
":common",
"//sdk/banjo/fuchsia.hardware.nand:fuchsia.hardware.nand_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.nand:fuchsia.hardware.nand_llcpp",
"//sdk/lib/fdio",
"//src/devices/testing/fake_ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/devmgr-integration-test",
"//zircon/system/ulib/devmgr-launcher",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/ramdevice-client",
# TODO(fxb/38132): Migrate to the new bind rules and delete the below
"//src/lib/ddk:ddk-deprecated-binding-headers",
]
data_deps = [ ":ram-nand" ]
}
bootfs_test("ram-nand-test-bootfs-test") {
name = "ram-nand-test"
deps = [ ":ram-nand-test" ]
}
group("tests") {
testonly = true
deps = [ ":ram-nand-bind_test" ]
}