Namespaces
Enumerations
enum Arch
| Name | Value |
|---|---|
| kX64 | 0 |
| kArm64 | 1 |
| kRiscv64 | 2 |
Defined at line 12 of file ../../src/firmware/paver/config.h
enum BindOption
| Name | Value |
|---|---|
| TryBind | 0 |
| Reformat | 1 |
Options for locating an FVM within a partition.
Defined at line 19 of file ../../src/firmware/paver/fvm.h
enum FormatResult
| Name | Value |
|---|---|
| kUnknown | 0 |
| kPreserved | 1 |
| kReformatted | 2 |
Describes the result of attempting to format an Fvm Partition.
Defined at line 27 of file ../../src/firmware/paver/fvm.h
enum PartitionScheme
| Name | Value |
|---|---|
| kNew | 0 |
| kLegacy | 1 |
Whether the device uses the new or legacy partition scheme.
Defined at line 35 of file ../../src/firmware/paver/device-partitioner.h
enum Partition
| Name | Value |
|---|---|
| kUnknown | 0 |
| kBootloaderA | 1 |
| kBootloaderB | 2 |
| kBootloaderR | 3 |
| kZirconA | 4 |
| kZirconB | 5 |
| kZirconR | 6 |
| kSysconfig | 7 |
| kVbMetaA | 8 |
| kVbMetaB | 9 |
| kVbMetaR | 10 |
| kAbrMeta | 11 |
| kFuchsiaVolumeManager | 12 |
Defined at line 37 of file ../../src/firmware/paver/device-partitioner.h
Records
-
class AndroidAbrClient -
class AndroidDevicePartitioner -
class AndroidPartitionerFactory -
class AstroPartitioner -
class AstroPartitionerContext -
class AstroPartitionerFactory -
class AstroSysconfigPartitionClientBuffered -
class Bl2PartitionClient -
class BlockAndController -
class BlockDevices -
class BlockPartitionClient -
class BootManager -
class Context -
class ContextBase -
class DataSink -
class DataSinkImpl -
class DefaultPartitionerFactory -
class DevfsVolumeConnector -
class DevicePartitioner -
class DevicePartitionerFactory -
class DirBasedVolumeConnector -
class DynamicDataSink -
class EfiDevicePartitioner -
class FixedDevicePartitioner -
class FixedOffsetBlockPartitionClient -
class GptDevicePartitioner -
class GptPartitionMetadata -
class LuisPartitioner -
class LuisPartitionerFactory -
class MoonflowerAbrClient -
class MoonflowerGptEntryAttributes -
class MoonflowerPartitioner -
class MoonflowerPartitionerFactory -
class NelsonBootloaderPartitionClient -
class NelsonPartitioner -
class NelsonPartitionerFactory -
class PartitionClient -
class PartitionCopyClient -
class PartitionMetadata -
class PartitionPosition -
class PartitionServiceBasedVolumeConnector -
class PartitionSpec -
class Paver -
class PaverConfig -
class SherlockPartitioner -
class SherlockPartitionerFactory -
class SkipBlockDevicePartitioner -
class SkipBlockPartitionClient -
class StreamReader -
class Sysconfig -
class UefiPartitionerFactory -
class Vim3Partitioner -
class Vim3PartitionerFactory -
class VolumeConnector
Functions
-
fuchsia_system_state::SystemPowerState GetShutdownSystemState (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_dir)Retrieve current System Power State from `fuchsia.system.state.SystemStateTransition`.
`fuchsia.system.state.SystemPowerState.kFullyOn` is returned if state can't be retrieved.
Defined at line 18 of file ../../src/firmware/paver/system_shutdown_state.cc
-
void Warn (const char * problem, const char * action)Warn users about issues in a way that is intended to stand out from
typical error logs. These errors typically require user intervention,
or may result in data loss.
Defined at line 19 of file ../../src/firmware/paver/pave-logging.h
-
Arch GetCurrentArch ()Get the architecture of the currently running platform.
Defined at line 19 of file ../../src/firmware/paver/config.h
-
template <typename T>std::unique_ptr<T> WrapUnique (T * ptr)Helper function to auto-deduce type.
Defined at line 29 of file ../../src/firmware/paver/utils.h
-
zx::result<> WriteSparse (PartitionClient & partition, const PartitionSpec & spec, zx::vmo payload_vmo, size_t payload_size)Writes the Android Sparse-formatted image from `payload_vmo` into `partition`.
Defined at line 176 of file ../../src/firmware/paver/sparse.cc
-
bool ExtractZbiPayload (std::span<const uint8_t> data, const zbi_header_t ** header, std::span<const uint8_t> * payload)Extract the payload out of the given ZBI image.
Return "true" on success, or "false" if the input data is invalid.
On success, sets "header" to the header of the ZBI image, and
"payload" to the payload of the ZBI. Both are guaranteed to be
completed contained in "data".
Defined at line 68 of file ../../src/firmware/paver/validation.cc
-
bool IsValidKernelZbi (Arch arch, std::span<const uint8_t> data)Perform some basic safety checks to ensure the given payload is a valid ZBI
for the given architecture.
Defined at line 105 of file ../../src/firmware/paver/validation.cc
-
bool IsValidAndroidKernel (std::span<const uint8_t> data)Perform some basic safety checks to ensure the given payload is a valid Android image.
Defined at line 149 of file ../../src/firmware/paver/validation.cc
-
bool IsValidAndroidVendorKernel (std::span<const uint8_t> data)Defined at line 153 of file ../../src/firmware/paver/validation.cc
-
zx::result<std::unique_ptr<VolumeConnector>> OpenBlockPartition (const paver::BlockDevices & devices, std::optional<uuid::Uuid> unique_guid, std::optional<uuid::Uuid> type_guid, zx_duration_t timeout)Defined at line 39 of file ../../src/firmware/paver/utils.cc
-
bool SpecMatches (const PartitionSpec & a, const PartitionSpec & b)Defined at line 90 of file ../../src/firmware/paver/device-partitioner.h
-
zx::result<fidl::ClientEnd<fuchsia_device::Controller>> TryBindToFvmDriver (const fbl::unique_fd & devfs_root, fidl::UnownedClientEnd<fuchsia_device::Controller> partition, zx::duration timeout)Attempts to bind an FVM driver to a partition device. Returns a connection for the FVM's device.
Defined at line 225 of file ../../src/firmware/paver/fvm.cc
-
bool IsValidChromeOsKernel (std::span<const uint8_t> data)Perform some basic safety checks to ensure the given payload is a valid ChromeOS
kernel image.
Defined at line 157 of file ../../src/firmware/paver/validation.cc
-
zx::result<std::unique_ptr<VolumeConnector>> OpenSkipBlockPartition (const paver::BlockDevices & devices, const uuid::Uuid & type_guid, zx_duration_t timeout)Defined at line 84 of file ../../src/firmware/paver/utils.cc
-
bool HasSkipBlockDevice (const paver::BlockDevices & devices)Defined at line 100 of file ../../src/firmware/paver/utils.cc
-
zx::result<> WipeBlockPartition (const paver::BlockDevices & devices, std::optional<uuid::Uuid> unique_guid, std::optional<uuid::Uuid> type_guid)Attempts to open and overwrite the first block of the underlying
partition. Does not rebind partition drivers.
At most one of |unique_guid| and |type_guid| may be nullptr.
Defined at line 110 of file ../../src/firmware/paver/utils.cc
-
zx::result<> IsBoard (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root, std::string_view board_name)Defined at line 173 of file ../../src/firmware/paver/utils.cc
-
const char * PartitionName (Partition partition, PartitionScheme scheme)Defined at line 128 of file ../../src/firmware/paver/device-partitioner.cc
-
std::optional<uuid::Uuid> PartitionTypeGuid (Partition partition, PartitionScheme scheme)Defined at line 136 of file ../../src/firmware/paver/device-partitioner.cc
-
bool FilterByName (const GptPartitionMetadata & part, std::string_view name)Defined at line 130 of file ../../src/firmware/paver/gpt.cc
-
bool FilterByTypeAndName (const GptPartitionMetadata & part, const uuid::Uuid & type, std::string_view name)Defined at line 140 of file ../../src/firmware/paver/gpt.cc
-
bool IsFuchsiaSystemPartition (const PaverConfig & config, const GptPartitionMetadata & part)Defined at line 145 of file ../../src/firmware/paver/gpt.cc
-
void utf16_to_cstring (char * dst, const uint8_t * src, size_t charcount)TODO(69527): Remove this and migrate usages to |utf16_to_utf8|
Defined at line 164 of file ../../src/firmware/paver/gpt.h
-
bool FilterByType (const GptPartitionMetadata & part, const uuid::Uuid & type)Defined at line 172 of file ../../src/firmware/paver/gpt.h
-
bool IsFvmPartition (const GptPartitionMetadata & part)Defined at line 181 of file ../../src/firmware/paver/gpt.h
-
bool IsZirconPartitionSpec (const PartitionSpec & spec)Returns true if the spec partition is Zircon A/B/R.
Defined at line 189 of file ../../src/firmware/paver/gpt.h
-
bool IsEfiSystemPartition (const GptPartitionMetadata & part)Defined at line 194 of file ../../src/firmware/paver/gpt.h
-
zx::result<fidl::ClientEnd<fuchsia_device::Controller>> FvmPartitionFormat (const fbl::unique_fd & devfs_root, BlockPartitionClient & block, const fvm::SparseImage & header, BindOption option, FormatResult * format_result)Formats the FVM within the provided partition if it is not already formatted.
Returns a connection to the FVM's device.
Defined at line 289 of file ../../src/firmware/paver/fvm.cc
-
zx::result<> AllocateEmptyPartitions (const fbl::unique_fd & devfs_root, fidl::UnownedClientEnd<fuchsia_storage_block::VolumeManager> fvm_device)Allocates empty partitions inside the volume manager. Note that the partitions
are simply allocated; the actual size of each partition (number of slices etc)
is determined when formatting each volume.
Defined at line 705 of file ../../src/firmware/paver/fvm.cc
-
zx::result<std::string> GetBoardName (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root)Defined at line 155 of file ../../src/firmware/paver/utils.cc
-
zx::result<> FvmStreamPartitions (const fbl::unique_fd & devfs_root, std::unique_ptr<PartitionClient> partition_client, std::unique_ptr<fvm::ReaderInterface> payload)Given an fd representing a "sparse FVM format", fill the FVM with the
provided partitions described by |partition_fd|.
Decides to overwrite or create new partitions based on the type
GUID, not the instance GUID.
Defined at line 729 of file ../../src/firmware/paver/fvm.cc
-
zx_status_t FvmUnbind (const fbl::unique_fd & devfs_root, const char * device)Unbinds the FVM driver from the given device. Assumes that the driver is either
loaded or not (but not in the process of being loaded).
Defined at line 912 of file ../../src/firmware/paver/fvm.cc
-
zx_status_t WipeAllFvmPartitionsWithGuid (fidl::UnownedClientEnd<fuchsia_device::Controller> fvmconst uint8_t[] type_guid)Deletes all partitions within the FVM with a type GUID matching |type_guid|
until there are none left.
Defined at line 645 of file ../../src/firmware/paver/fvm.cc
Variables
zx_duration_t g_wipe_timeout
Defined at line 37 of file ../../src/firmware/paver/utils.cc