| # 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. |
| |
| visibility = [ |
| ":*", |
| "e2e_test:*", |
| "test:*", |
| "//src/bringup/bin/netvsc:*", |
| "//src/bringup/bin/paver:*", |
| "//src/storage/bin/disk-pave:*", |
| ] |
| |
| 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-tests" ] |
| } |
| visibility += [ "*" ] |
| } |
| |
| # Core paver implementation shared between all implementations. |
| source_set("paver-core") { |
| public = [ "paver.h" ] |
| sources = [ |
| "abr-client.cc", |
| "block-devices.cc", |
| "device-partitioner.cc", |
| "fvm.cc", |
| "partition-client.cc", |
| "paver.cc", |
| "sparse.cc", |
| "stream-reader.cc", |
| "sysconfig-fidl.cc", |
| "system_shutdown_state.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", |
| "//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/fidl/fuchsia.storage.partitions:fuchsia.storage.partitions_cpp", |
| "//sdk/fidl/fuchsia.system.state:fuchsia.system.state_cpp", |
| "//sdk/lib/syslog/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" ] |
| public_deps = [ |
| ":paver-core", |
| ":skip-block", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| "//zircon/system/ulib/sysconfig-client:sysconfig-sync-client", |
| ] |
| } |
| |
| source_set("sherlock") { |
| sources = [ "sherlock.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("nelson") { |
| sources = [ "nelson.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("moonflower") { |
| sources = [ "moonflower.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| "//zircon/system/ulib/hwreg", |
| ] |
| } |
| |
| source_set("luis") { |
| sources = [ "luis.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("vim3") { |
| sources = [ "vim3.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/devices/lib/amlogic", |
| "//src/lib/uuid", |
| "//src/storage/gpt", |
| ] |
| } |
| |
| source_set("uefi") { |
| sources = [ "uefi.cc" ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/lib/uuid", |
| ] |
| } |
| |
| source_set("android") { |
| sources = [ |
| "android.cc", |
| "libboot_control.cc", |
| ] |
| public_deps = [ |
| ":gpt", |
| ":paver-core", |
| "//src/lib/uuid", |
| ] |
| deps = [ "//zircon/third_party/ulib/cksum" ] |
| } |
| |
| # Glob together all paver implementations into a single library until we can compose ZBI via |
| # packages. |
| source_set("paver") { |
| public_deps = [ |
| ":android", |
| ":astro", |
| ":luis", |
| ":moonflower", |
| ":nelson", |
| ":paver-core", |
| ":sherlock", |
| ":uefi", |
| ":vim3", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_cpp", |
| ] |
| } |