blob: 77095e1442f8934a310c3f1460f7bc65650a5553 [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/assembly/generated_partitions_config.gni")
assert(current_toolchain == default_toolchain,
"//boards/paritions/* is only valid in the Fuchsia toolchain")
_standard_names = {
zbi_a = "zircon_a"
zbi_b = "zircon_b"
zbi_r = "zircon_r"
vbmeta_a = "vbmeta_a"
vbmeta_b = "vbmeta_b"
vbmeta_r = "vbmeta_r"
fvm = "fvm"
}
_gigaboot = {
testonly = true
bootloader_partitions = [
{
image = "$root_build_dir/fuchsia.esp.blk"
type = ""
name = "fuchsia-esp"
},
]
deps = [ "//build/images/flash:esp" ]
}
generated_partitions_config("default") {
hw_revision = ""
}
generated_partitions_config("x64") {
forward_variables_from(_gigaboot, "*")
hw_revision = "x64"
# TODO: Investigate if we can change these to the standard names.
zbi_a = "zircon-a"
zbi_b = "zircon-b"
zbi_r = "zircon-r"
vbmeta_a = "vbmeta_a"
vbmeta_b = "vbmeta_b"
vbmeta_r = "vbmeta_r"
# At most one of either a fvm or fxfs will be generated, but the board
# supports either configuration.
fvm = "fvm"
fxfs = "fvm"
}
generated_partitions_config("arm64") {
forward_variables_from(_gigaboot, "*")
forward_variables_from(_standard_names, "*")
hw_revision = "arm64"
}
generated_partitions_config("riscv64") {
hw_revision = "riscv64"
}
group("partitions") {
testonly = true
public_deps = [ ":${target_cpu}_configs" ]
}
if (target_cpu == "x64") {
group("x64_configs") {
testonly = true
public_deps = [ ":x64" ]
}
} else if (target_cpu == "arm64") {
group("arm64_configs") {
testonly = true
public_deps = [
":arm64",
"vim3",
]
}
} else if (target_cpu == "riscv64") {
group("riscv64_configs") {
testonly = true
public_deps = [ ":riscv64" ]
}
}
group("verifications") {
testonly = true
deps = [ "vim3:verify" ]
}