bios

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package bios contains functions to support bios manipulation via servo. Reviews for this package can be sent to tast-fw-library-reviewers@ (before tast-owners@ review).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteImage

func NewRemoteImage(ctx context.Context, runner ServoHostCommandRunner, programmer string, section commonbios.ImageSection, extraFlashromArgs []string) (*commonbios.Image, error)

NewRemoteImage creates an Image object representing the currently loaded BIOS image. If you pass in a section, only that section will be read.

func WriteRemoteFlashrom

func WriteRemoteFlashrom(ctx context.Context, runner ServoHostCommandRunner, programmer string, i *commonbios.Image, sec commonbios.ImageSection, extraFlashromArgs []string) error

WriteRemoteFlashrom writes the current data in the specified section into flashrom.

Types

type ServoHostCommandRunner

type ServoHostCommandRunner interface {
	// RunCommand execs a command as the root user.
	RunCommand(ctx context.Context, asRoot bool, name string, args ...string) error
	// OutputCommand execs a command as the root user and returns stdout
	OutputCommand(ctx context.Context, asRoot bool, name string, args ...string) ([]byte, error)
	// GetFile copies a remote file to a local file
	GetFile(ctx context.Context, asRoot bool, remoteFile, localFile string) error
	// PutFiles copies a local files to servo host files
	PutFiles(ctx context.Context, asRoot bool, fileMap map[string]string) error
}

ServoHostCommandRunner runs a command on the servo host. Normally this is the servo proxy.

Jump to

Keyboard shortcuts

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