| # Copyright 2022 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/board.gni") |
| |
| # Copy any board-specific tools. |
| group("board_tools") { |
| deps = [] |
| |
| foreach(tool_path, board_tools) { |
| basename = get_path_info(tool_path, "file") |
| copy("board_tool_$basename") { |
| sources = [ tool_path ] |
| outputs = [ "$root_out_dir/board_tools/$basename" ] |
| |
| metadata = { |
| images = [ |
| { |
| label = |
| get_label_info(":board_tool_$basename", "label_with_toolchain") |
| archive = true |
| name = "$basename" |
| path = "board_tools/$basename" |
| type = "script" |
| }, |
| ] |
| } |
| } |
| |
| deps += [ ":board_tool_$basename" ] |
| } |
| } |
| |
| group("bootserver") { |
| deps = [ "//tools/bootserver_old:bootserver($host_toolchain)" ] |
| |
| host_out_dir = get_label_info(":bogus($host_toolchain)", "root_out_dir") |
| |
| metadata = { |
| images = [ |
| { |
| label = get_label_info(":$target_name", "label_with_toolchain") |
| archive = true |
| name = "bootserver" |
| path = rebase_path("$host_out_dir/bootserver", root_build_dir) |
| type = "exe.$host_platform" |
| }, |
| ] |
| } |
| } |
| |
| copy("fastboot") { |
| sources = [ "//prebuilt/third_party/fastboot/fastboot" ] |
| host_out_dir = get_label_info(":bogus($host_toolchain)", "root_out_dir") |
| outputs = [ "$host_out_dir/fastboot" ] |
| |
| metadata = { |
| tool_paths = [ |
| { |
| cpu = host_cpu |
| label = get_label_info(":fastboot", "label_with_toolchain") |
| name = "fastboot" |
| os = host_os |
| path = rebase_path(outputs[0], root_build_dir) |
| }, |
| ] |
| |
| images = [ |
| { |
| label = get_label_info(":fastboot", "label_with_toolchain") |
| archive = true |
| name = "fastboot" |
| path = rebase_path(outputs[0], root_build_dir) |
| type = "exe.$host_platform" |
| }, |
| ] |
| } |
| } |