blob: 5f7ee354c1892c9645f616f367444f4cf1cb1178 [file] [log] [blame] [edit]
# Copyright 2023 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/bazel/bazel_inputs.gni")
import("//build/bazel/drivers/bazel_driver_package.gni")
import("//build/config/fuchsia_cxx_version.gni")
import("//build/devicetree/devicetree.gni")
import("//build/zbi/zbi_input.gni")
bazel_driver_package("bazel_package") {
bazel_target =
"//sdk/lib/driver/devicetree/examples/example-board:example-board"
package_name = "example-board"
# TODO(b/352586714) - Driver will link in restricted symbols when Bazel uses RBE.
remote_build = target_cpu != "riscv64"
}
devicetree("example-board") {
sources = [ "dts/example-board.dts.S" ]
golden = "dts/example-board.golden.dts"
deps = [ "//zircon/system/ulib/ddk-platform-defs" ]
}
# Add this target to |kernel_zbi_extra_deps| to include the devicetree blob
# (dtb) in the kernel ZBI. Typically the bootloader will pass down the dtb.
# This method should only be used during board bringup.
zbi_input("example-board-dtb") {
deps = [ ":example-board-dt" ]
type = "devicetree"
sources = [ "$target_out_dir/example-board.dtb" ]
}
bazel_input_file("test-dtb") {
generator = ":example-board"
outputs = [ "$target_out_dir/example-board.dtb" ]
gn_targets_name = "test-dtb"
}