bootloader

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorBadAlignment = Error("Bad Alignment")
View Source
const ErrorBlobMismatch = Error("Signed and unsigned blob don't match")
View Source
const ErrorBootFailed = Error("Boot failed")
View Source
const ErrorDowngradeNotAllowed = Error("Downgrade rejected")
View Source
const ErrorHeaderSizeInvalid = Error("Invalid header size")
View Source
const ErrorHeaderVersionUnknown = Error("Unkown header version")
View Source
const ErrorImageEncryptionMissing = Error("Encryption Missing")
View Source
const ErrorImageHashInvalid = Error("Image hash invalid")
View Source
const ErrorImageHashMissing = Error("Image hash missing")
View Source
const ErrorImageSignatureInvalid = Error("Image signature invalid")
View Source
const ErrorImageSignatureLengthInvalid = Error("Image signature length invalid")
View Source
const ErrorImageSignatureMissing = Error("Image signature missing")
View Source
const ErrorImageTooLarge = Error("Image too large")
View Source
const ErrorParitionDoesNotExist = Error("Partition does not exist")
View Source
const ErrorReadFailed = Error("Read failed")
View Source
const ErrorUnsupportedResult = Error("Unsupported result")
View Source
const ErrorWrongParition = Error("Wrong partition")
View Source
const ErrrorProtocol = Error("Protocol error")

Variables

This section is empty.

Functions

func GetVersionBlobFromFile

func GetVersionBlobFromFile(filename string) ([]byte, error)

Types

type Bootloader

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

func NewBootloader

func NewBootloader(device *serialpacket.Device) *Bootloader

func (*Bootloader) Boot

func (b *Bootloader) Boot(partition int) error

func (*Bootloader) CheckImage

func (b *Bootloader) CheckImage(partition int) (uint32, error)

func (*Bootloader) GetRandom

func (b *Bootloader) GetRandom() (uint32, error)

func (*Bootloader) GetSecureCounter

func (b *Bootloader) GetSecureCounter() (uint32, error)

func (*Bootloader) GetVersionBlob

func (b *Bootloader) GetVersionBlob(partition int) ([]byte, error)

func (*Bootloader) LoadImage

func (b *Bootloader) LoadImage(filename string, partition int) error

func (*Bootloader) SetAddress

func (b *Bootloader) SetAddress(addr uint8) error

func (*Bootloader) SetSecure

func (b *Bootloader) SetSecure() error

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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