firmware

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: 11 Imported by: 0

Documentation

Overview

Package firmware implements the libraries and utilities which are used for both local and remote bundles with the same name 'firmware'. 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 AllGBBFlags

func AllGBBFlags() []pb.GBBFlag

AllGBBFlags returns all the GBB Flags in order by their int values.

func ClearAndSetGBBFlags

func ClearAndSetGBBFlags(ctx context.Context, dut *dut.DUT, state *pb.GBBFlagsState) error

ClearAndSetGBBFlags clears and sets specified GBB flags, leaving the rest unchanged.

func CopyGBBFlags

func CopyGBBFlags(s *pb.GBBFlagsState) *pb.GBBFlagsState

CopyGBBFlags returns a new GBBFlagsState that is a copy of `s`.

func FAFTGBBFlags

func FAFTGBBFlags() []pb.GBBFlag

FAFTGBBFlags returns the flags that faft sets in firmware_test.py before starting a test.

func GBBAddFlag

func GBBAddFlag(s *pb.GBBFlagsState, flags ...pb.GBBFlag)

GBBAddFlag modifies `s` to add all flags in `flags`.

func GBBFlagsChanged

func GBBFlagsChanged(a, b *pb.GBBFlagsState, flags []pb.GBBFlag) bool

GBBFlagsChanged determines if any of the flags definitely have changed between a and b.

func GBBFlagsContains

func GBBFlagsContains(s *pb.GBBFlagsState, flag pb.GBBFlag) bool

GBBFlagsContains returns true if `s` contains the requested GBB flag `flag`.

func GBBFlagsStatesEqual

func GBBFlagsStatesEqual(a, b *pb.GBBFlagsState) bool

GBBFlagsStatesEqual determines if 2 GBBFlagsState are the same.

func GBBToggle

func GBBToggle(flags []pb.GBBFlag, flag pb.GBBFlag) []pb.GBBFlag

GBBToggle adds `flag` to `flags` if it is missing, or removes it if it is present. Returns a new list, and does not modify the `flags` slice.

func GetGBBFlags

func GetGBBFlags(ctx context.Context, dut *dut.DUT) (*pb.GBBFlagsState, error)

GetGBBFlags gets the flags that are cleared and set.

func RebootRequiredGBBFlags

func RebootRequiredGBBFlags() []pb.GBBFlag

RebootRequiredGBBFlags returns flags that require a DUT reboot after they are changed.

func SetGBBFlags

func SetGBBFlags(ctx context.Context, dut *dut.DUT, flags []pb.GBBFlag) error

SetGBBFlags ignores the previous GBB flags and sets them to the specified flags.

Types

type BootMode

type BootMode string

BootMode is a string representing the DUT's firmware boot-mode. It is intended to be used with the constants defined below.

const (
	BootModeNormal      BootMode = "normal"
	BootModeDev         BootMode = "dev"
	BootModeUSBDev      BootMode = "usbdev"
	BootModeRecovery    BootMode = "rec"
	BootModeUnspecified BootMode = "unspecified"
)

DUTs have four possible boot modes: Normal, Dev, USBDev, and Recovery.

type RWSection

type RWSection string

RWSection refers to one of the two RW firmware sections installed on a Chromebook.

const (
	RWSectionA           RWSection = "A"
	RWSectionB           RWSection = "B"
	RWSectionUnspecified RWSection = ""
)

There are two RW sections of firmware: "A" and "B". Normally, A is used unless B is required, such as while updating A.

Directories

Path Synopsis
Package bios contains functions to support bios manipulation.
Package bios contains functions to support bios manipulation.
Package serial allows communication with serial ports.
Package serial allows communication with serial ports.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package ti50 implements shared libraries for ti50 testing.
Package ti50 implements shared libraries for ti50 testing.

Jump to

Keyboard shortcuts

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