| # Copyright 2019 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/zircon/zx_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:paver-fuzzers" ] |
| |
| # TODO(https://fxbug.dev/42165433): Paver tests are disabled on coverage builds due to flakiness. |
| # TODO(b/301283466): Paver tests cannot run on RISCV64 builds due to Sv39 address space limits. |
| if (!is_coverage && current_cpu != "riscv64") { |
| deps += [ "test:paver-test" ] |
| } |
| } |
| |
| # Core paver implementation shared between all implementations. |
| source_set("paver-core") { |
| sources = [ |
| "abr-client.cc", |
| "device-partitioner.cc", |
| "fvm.cc", |
| "partition-client.cc", |
| "paver.cc", |
| "sparse.cc", |
| "stream-reader.cc", |
| "sysconfig-fidl.cc", |
| "utils.cc", |
| "validation.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_cpp", |
| "//sdk/fidl/fuchsia.hardware.block.encrypted:fuchsia.hardware.block.encrypted_cpp", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_cpp", |
| "//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_cpp", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock_cpp", |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/device-watcher/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fidl", |
| "//sdk/lib/syslog/cpp:cpp", |
| "//src/security/lib/zxcrypt:zxcrypt-client", |
| "//src/storage/gpt", |
| "//src/storage/lib/fs_management", |
| "//src/storage/lib/ramdevice_client/cpp:ramdevice-client-static", |
| "//src/storage/lib/sparse/c:sparse", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/third_party/ulib/cksum", |
| "//zircon/third_party/ulib/safemath", |
| ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.fshost:fuchsia.fshost_cpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_cpp", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_cpp", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock_cpp", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_cpp", |
| "//sdk/lib/zbi-format", |
| "//src/firmware/lib/abr", |
| "//src/lib/uuid", |
| "//src/storage/fvm", |
| "//src/storage/lib/block_client/cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| # Helper libraries to aid board specific implementations. |
| source_set("gpt") { |
| sources = [ "gpt.cc" ] |
| deps = [ "//sdk/fidl/fuchsia.device:fuchsia.device_cpp" ] |
| public_deps = [ |
| ":paver-core", |
| "//sdk/lib/component/incoming/cpp", |
| "//src/storage/gpt", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| source_set("skip-block") { |
| sources = [ "skip-block.cc" ] |
| deps = [ "//src/lib/uuid" ] |
| public_deps = [ |
| ":paver-core", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//src/storage/gpt", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| # Board specific paver implementations. |
| source_set("astro") { |
| sources = [ "astro.cc" ] |
| deps = [ |
| ":paver-core", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| public_deps = [ |
| ":skip-block", |
| "//zircon/system/ulib/sysconfig-client:sysconfig-sync-client", |
| ] |
| } |
| |
| source_set("sherlock") { |
| sources = [ "sherlock.cc" ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("nelson") { |
| sources = [ "nelson.cc" ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("luis") { |
| sources = [ "luis.cc" ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("vim3") { |
| sources = [ "vim3.cc" ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("violet") { |
| sources = [ "violet.cc" ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("x64") { |
| sources = [ |
| "system_shutdown_state.cc", |
| "x64.cc", |
| ] |
| deps = [ |
| ":gpt", |
| ":paver-core", |
| "//sdk/fidl/fuchsia.device.manager:fuchsia.device.manager_cpp", |
| "//src/lib/uuid", |
| ] |
| } |
| |
| # Glob together all paver implementations into a single library until we can compose ZBI via |
| # packages. |
| source_set("paver") { |
| public_deps = [ |
| ":astro", |
| ":luis", |
| ":nelson", |
| ":paver-core", |
| ":sherlock", |
| ":vim3", |
| ":violet", |
| ":x64", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_cpp", |
| ] |
| } |