Project: /_project.yaml Book: /_book.yaml

fuchsia.paver

PROTOCOLS

PayloadStream {:#PayloadStream}

Defined in fuchsia.paver/paver.fidl

Protocol for streaming the FVM payload.

RegisterVmo {:#RegisterVmo}

Registers a VMO to stream into.

Request

Response

ReadData {:#ReadData}

Reads data into the pre-registered vmo.

Request

Response

Paver {:#Paver}

Defined in fuchsia.paver/paver.fidl

Protocol for managing boot partitions.

Most of the protocol methods rely on auto-discovery of the storage device which will be paved. If the device has no pre-initialized storage devices or multiple, the methods will fail. For devices with dynamic partitions (i.e. GPT), |InitializePartitionTables| and |WipeVolumes| can be used to control which device is paved to.

InitializeAbr {:#InitializeAbr}

Initializes ABR metadata. Should only be called to initialize ABR metadata for the first time (i.e. it should not be called every boot), or recover from corrupted ABR metadata.

Returns ZX_ERR_NOT_SUPPORTED if A/B partition scheme is not supported and we always boot from configuration A.

Request

Response

QueryActiveConfiguration {:#QueryActiveConfiguration}

Queries active configuration.

Returns ZX_ERR_NOT_SUPPORTED if A/B partition scheme is not supported and we always boot from configuration A.

Request

Response

QueryConfigurationStatus {:#QueryConfigurationStatus}

Queries status of |configuration|.

Returns ZX_ERR_INVALID_ARGS if Configuration.RECOVERY is passed in via |configuration|.

Request

Response

SetConfigurationActive {:#SetConfigurationActive}

Updates persistent metadata identifying which configuration should be selected as ‘primary’ for booting purposes. Should only be called after KERNEL as well as optional VERIFIED_BOOT_METADATA assets for specified configuration were written successfully.

Returns ZX_ERR_INVALID_ARGS if Configuration.RECOVERY is passed in via |configuration|.

Request

Response

SetConfigurationUnbootable {:#SetConfigurationUnbootable}

Updates persistent metadata identifying whether |configuration| is bootable. Should only be called in the following situations:

  • Before KERNEL as well as optional VERIFIED_BOOT_METADATA assets for specified |configuration| are written.
  • After successfully booting from a new configuration and marking it healthy. This method would be then called on the old configuration.
  • After “successfully” booting from a new configuration, but encountering an unrecoverable error during health check. This method would be then called on the new configuration.

If the configuration is unbootable, no action is taken.

Returns ZX_ERR_INVALID_ARGS if Configuration.RECOVERY is passed in via |configuration|.

Request

Response

SetActiveConfigurationHealthy {:#SetActiveConfigurationHealthy}

Updates persistent metadata identifying that active configuration is stable. Used to signal “rollback to previous slot” logic is not needed anymore. Meant to be called in subsequent boot attempt after SetActiveConfiguration was called. Will return error if active configuration is currently unbootable.

If the configuration is already marked healthy, no action is taken.

Request

Response

ReadAsset {:#ReadAsset}

Reads partition corresponding to |configuration| and |asset| into a vmo and returns it.

Request

Response

WriteAsset {:#WriteAsset}

Writes partition corresponding to configuration and asset with data from payload. payload may need to be resized to the partition size, so the provided vmo must have been created with ZX_VMO_RESIZABLE or must be a child VMO that was created with ZX_VMO_CHILD_RESIZABLE. Will zero out rest of the partition if payload is smaller than the size of the partition being written.

Returns ZX_ERR_INVALID_ARGS if configuration specifies active configuration.

Request

Response

WriteVolumes {:#WriteVolumes}

Writes FVM with data from streamed via payload. This potentially affects all configurations.

Request

Response

WriteBootloader {:#WriteBootloader}

Writes bootloader partition with data from payload.

payload may need to be resized to the partition size, so the provided vmo must have been created with ZX_VMO_RESIZABLE or must be a child VMO that was created with ZX_VMO_CHILD_RESIZABLE.

Request

Response

WriteDataFile {:#WriteDataFile}

Writes /data/filename with data from payload. Overwrites file if it already exists.

Request

Response

WipeVolumes {:#WipeVolumes}

Wipes the FVM partition from the device. Should not be confused with factory reset, which is less intrusive.

Notable use cases include recovering from corrupted FVM as well as setting device to a “clean” state for automation.

If |block_device| is not provided, the paver will perform a search for the the FVM. If multiple block devices have valid GPT, |block_device| can be provided to specify which one to target. It assumed that channel backing |block_device| also implements fuchsia.io.Node for now.

Request

Response

InitializePartitionTables {:#InitializePartitionTables}

Initializes GPT on given block device and then adds an FVM partition.

|gpt_block_device| specifies the block device to use. It assumed that channel backing |gpt_block_device| also implements fuchsia.io.Node for now.

Request

Response

WipePartitionTables {:#WipePartitionTables}

Wipes all entries from the partition table of the specified block device. Currently only supported on devices with a GPT.

If |block_device| is not provided, the paver will perform a search for the the FVM. If multiple block devices have valid GPT, |block_device| can be provided to specify which one to target. It assumed that channel backing |block_device| also implements fuchsia.io.Node for now.

WARNING: This API may destructively remove non-fuchsia maintained partitions from the block device.

Request

Response

STRUCTS

Paver_QueryActiveConfiguration_Response {:#Paver_QueryActiveConfiguration_Response}

generated

Paver_QueryConfigurationStatus_Response {:#Paver_QueryConfigurationStatus_Response}

generated

Paver_ReadAsset_Response {:#Paver_ReadAsset_Response}

generated

ReadInfo {:#ReadInfo}

Defined in fuchsia.paver/paver.fidl

ENUMS

Configuration {:#Configuration}

Type: uint32

Defined in fuchsia.paver/paver.fidl

Describes the version of an asset.

Asset {:#Asset}

Type: uint32

Defined in fuchsia.paver/paver.fidl

Describes assets which may be updated. Each asset has 3 versions, each tied to a particular configuration.

ConfigurationStatus {:#ConfigurationStatus}

Type: uint32

Defined in fuchsia.paver/paver.fidl

Set of states configuration may be in.

UNIONS

Paver_QueryActiveConfiguration_Result {:#Paver_QueryActiveConfiguration_Result}

generated

Paver_QueryConfigurationStatus_Result {:#Paver_QueryConfigurationStatus_Result}

generated

Paver_ReadAsset_Result {:#Paver_ReadAsset_Result}

generated

ReadResult {:#ReadResult}

Defined in fuchsia.paver/paver.fidl