flash

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: BSD-2-Clause Imports: 12 Imported by: 0

README

The shell package provides a single module:

Flash

Read or write the SPI flash on the DUT.

ARGUMENTS:
	[read | write] <image>

For read operation, <image> sets the filepath the read image is saved at the client. 
For write operation, <image> is the local filepath to the image at the client.

This module is a wrapper around a flash software on the dutagent. At the moment only flashrom is supported. Other software will be configurable in this module later. The flasher software must be installed on the dutagent and a suitable flasher hardware must be hooked up to the DUT. Functionality is tested with DediProg programmers.

See flash-example-cfg.yml for examples.

Configuration Options

Option Value Description
programmer string Name of the flasher hardware, that is used by the dutagent and attached to the DUT's SPI flash.

Documentation

Overview

Package flash provides a dutagent module that reads or writes the SPI flash on the DUT. This module is a wrapper around a flash tool that is executed on a dutagent.

Index

Constants

View Source
const DefaultFlashTool = "/bin/flashrom"

DefaultFlashTool is the default tool on the dutagent.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flash

type Flash struct {
	// Programmer is the name of the flasher hardware.
	Programmer string
	// Tool is th path to the underlying flash-tool on the dutagent. If unset, [DefaultFlashTool] is used.
	// Currently only fashrom is supported.
	Tool string
	// contains filtered or unexported fields
}

Flash is a module that reads or writes the SPI flash on the DUT.

func (*Flash) Deinit

func (f *Flash) Deinit() error

func (*Flash) Help

func (f *Flash) Help() string

func (*Flash) Init

func (f *Flash) Init() error

func (*Flash) Run

func (f *Flash) Run(_ context.Context, sesh module.Session, args ...string) error

Jump to

Keyboard shortcuts

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