flash

package
v0.0.0-...-d562c2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2025 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package flash holds code to deal with the USB armory SD card storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device represents the flash storage for the unsarmory.

func New

func New(storage string) (*Device, error)

New creates a new usbarmory device instance.

storage is a comma separated string with the format: <proof_mount_point_path>,<firmware_block_device>

func (Device) ApplyUpdate

func (d Device) ApplyUpdate(u api.UpdatePackage) error

ApplyUpdate applies the firmware update to the armory SD Card device. The firmware image is written directly to the unikernel partition of the device (the raw block device is specified by the --armory_unikernel_dev flag), and proof bundle is stored in the proof partition of the device which must be mounted at the location specified by the --armory_proof_mount_point flag).

TODO(al): see what can be done to make this easier to use.

func (Device) DeviceCheckpoint

func (d Device) DeviceCheckpoint() ([]byte, error)

DeviceCheckpoint returns the latest log checkpoint stored on the device.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL