blob: 05c9b1f46240f57858ea198ea6028e9ea7c5ba62 [file] [log] [blame]
# 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/images/paths.gni")
import("//build/product.gni")
paver_targets = [
{
name = "paver-script"
outputs = [ "$root_build_dir/pave.sh" ]
deps = [
"//build/images/tools:bootserver",
labels.images,
]
if (use_bringup_assembly) {
switch = "--netboot="
} else {
switch = "--pave="
}
extra_bootserver_arguments = ""
metadata = {
images = [
{
label = get_label_info(":$name", "label_with_toolchain")
name = name
path = "pave.sh"
type = "script"
},
]
image_paths = [ "IMAGE_PAVE_SH=pave.sh" ]
}
},
]
if (enable_netboot) {
paver_targets += [
{
name = "netboot-script"
outputs = [ "$root_build_dir/netboot.sh" ]
switch = "--netboot="
extra_bootserver_arguments = ""
deps = [ "//build/images/tools:bootserver" ]
# TODO(https://fxbug.dev/42123048): The build graph for "bringup" (use_bringup_assembly) MUST only
# contain one zircon-a metadata target, which means that anything
# reaching fuchsia.zbi must be excluded from the build graph.
if (use_bringup_assembly) {
deps += [ "//build/images/bringup" ]
} else {
deps += [ "//build/images/fuchsia:netboot" ]
}
metadata = {
images = [
{
label = get_label_info(":$name", "label_with_toolchain")
name = name
path = "netboot.sh"
type = "script"
},
]
image_paths = [ "IMAGE_NETBOOT_SH=netboot.sh" ]
}
},
]
}
if (recovery_is_zedboot) {
paver_targets += [
{
name = "zedboot-script"
outputs = [ "$root_build_dir/pave-zedboot.sh" ]
deps = [ "//build/images/tools:bootserver" ]
if (use_bringup_assembly) {
deps += [ "//build/images/bringup" ]
switch = "--netboot="
} else {
if (!use_bazel_images_only) {
deps += [ "//build/images/zedboot" ]
}
switch = "--pave_zedboot="
}
extra_bootserver_arguments = "--allow-zedboot-version-mismatch"
metadata = {
images = [
{
label = get_label_info(":$name", "label_with_toolchain")
name = name
path = "pave-zedboot.sh"
type = "script"
},
]
image_paths = [ "IMAGE_PAVE_ZEDBOOT_SH=pave-zedboot.sh" ]
}
},
]
}