blob: a9df31881de7063e74137d2ebec5ea3db3685ed1 [file]
# 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")
group("partitions") {
testonly = true
public_deps = [ ":${target_cpu}_configs" ]
}
_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"
}
# Baseline partition sizes that represent the default/minimum sizes
# required to support booting Fuchsia on standard emulator/virtual
# targets.
generated_partitions_config("default") {
hw_revision = ""
forward_variables_from(_standard_names, "*")
zbi_a_size = 33554432 # 32 MiB
zbi_b_size = 33554432 # 32 MiB
zbi_r_size = 33554432 # 32 MiB
vbmeta_a_size = 65536 # 64 KiB
vbmeta_b_size = 65536 # 64 KiB
vbmeta_r_size = 65536 # 64 KiB
fvm_size = 17179869184 # 16 GiB
}
if (target_cpu == "x64") {
group("x64_configs") {
testonly = true
public_deps = [ ":x64" ]
}
generated_partitions_config("x64") {
testonly = true
forward_variables_from(_standard_names, "*")
zbi_a_size = 134217728 # 128 MiB
zbi_b_size = 134217728 # 128 MiB
zbi_r_size = 205520896 # 196 MiB
vbmeta_a_size = 65536 # 64 KiB
vbmeta_b_size = 65536 # 64 KiB
vbmeta_r_size = 65536 # 64 KiB
# Gigaboot bootloader that is put to `bootloader` partition.
# TODO(b/399522436): This should be moved to platform specific build files.
bootloader_partitions = [
{
image = "$root_build_dir/fuchsia.esp.blk"
type = ""
name = "bootloader"
},
]
deps = [ "//src/firmware/gigaboot/cpp:fuchsia" ]
hw_revision = "x64"
# At most one of either a fvm or fxfs will be generated, but the board
# supports either configuration.
fvm = "fvm"
fxfs = "fvm"
fvm_size = 60129542144 # 56 GiB
fxfs_size = 60129542144 # 56 GiB
}
}
if (target_cpu == "arm64") {
group("arm64_configs") {
testonly = true
public_deps = [
":arm64",
"vim3",
]
}
generated_partitions_config("arm64") {
testonly = true
forward_variables_from(_standard_names, "*")
zbi_a_size = 33554432 # 32 MiB
zbi_b_size = 33554432 # 32 MiB
zbi_r_size = 33554432 # 32 MiB
vbmeta_a_size = 65536 # 64 KiB
vbmeta_b_size = 65536 # 64 KiB
vbmeta_r_size = 65536 # 64 KiB
# Gigaboot bootloader that is put to legacy `fuchsia-esp` partition
# TODO(b/399522436): This should be moved to platform specific build files.
bootloader_partitions = [
{
image = "$root_build_dir/fuchsia.esp.blk"
type = ""
name = "fuchsia-esp"
},
]
deps = [ "//src/firmware/gigaboot/cpp:fuchsia" ]
hw_revision = "arm64"
fvm_size = 17179869184 # 16 GiB
}
generated_partitions_config("qemu-arm64") {
hw_revision = ""
zbi_r = "zircon_r"
zbi_r_size = 33554432 # 32 MiB
}
}
if (target_cpu == "riscv64") {
group("riscv64_configs") {
testonly = true
public_deps = [ ":riscv64" ]
}
generated_partitions_config("riscv64") {
hw_revision = "riscv64"
zbi_r = "zircon_r"
zbi_r_size = 33554432 # 32 MiB
}
not_needed([ "_standard_names" ])
}