fuchsia.paver

PROTOCOLS

PayloadStream

Defined in fuchsia.paver/paver.fidl

Protocol for streaming the FVM payload.

RegisterVmo

Registers a VMO to stream into.

Request

NameType
vmo handle<vmo>

Response

NameType
status int32

ReadData

Reads data into the pre-registered vmo.

Request

NameType

Response

NameType
result ReadResult

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.

QueryActiveConfiguration

Queries active configuration.

Request

NameType

Response

NameType
result Paver_QueryActiveConfiguration_Result

SetActiveConfiguration

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.

Request

NameType
configuration Configuration

Response

NameType
status int32

MarkActiveConfigurationSuccessful

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.

Request

NameType

Response

NameType
status int32

WriteAsset

Writes partition corresponding to configuration and asset with data from payload. 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

NameType
configuration Configuration
asset Asset
payload fuchsia.mem/Buffer

Response

NameType
status int32

WriteVolumes

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

Request

NameType
payload request<PayloadStream>

Response

NameType
status int32

WriteBootloader

Writes bootloader partition with data from payload.

Request

NameType
payload fuchsia.mem/Buffer

Response

NameType
status int32

WriteDataFile

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

Request

NameType
filename string[4096]
payload fuchsia.mem/Buffer

Response

NameType
status int32

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

NameType
block_device request<fuchsia.hardware.block/Block>?

Response

NameType
status int32

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

NameType
gpt_block_device request<fuchsia.hardware.block/Block>

Response

NameType
status int32

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

NameType
block_device request<fuchsia.hardware.block/Block>?

Response

NameType
status int32

STRUCTS

Paver_QueryActiveConfiguration_Response

Defined in fuchsia.paver/generated

NameTypeDescriptionDefault
configuration Configuration No default

ReadInfo

Defined in fuchsia.paver/paver.fidl

NameTypeDescriptionDefault
offset uint64 Offset into VMO where read data starts. No default
size uint64 Size of read data. No default

ENUMS

Configuration

Type: uint32

Defined in fuchsia.paver/paver.fidl

Describes the version of an asset.

NameValueDescription
A 1
B 2
RECOVERY 3

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.

NameValueDescription
KERNEL 1
VERIFIED_BOOT_METADATA 2

UNIONS

Paver_QueryActiveConfiguration_Result

Defined in fuchsia.paver/generated

NameTypeDescription
response Paver_QueryActiveConfiguration_Response
err int32

ReadResult

Defined in fuchsia.paver/paver.fidl

NameTypeDescription
err int32 Error encountered while reading data.
eof bool End of file reached.
info ReadInfo Information about location of successfully read data within pre-registered VMO.