paver

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ImageManifest = "images.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildPaver

type BuildPaver struct {
	BootserverPath string
	ImageDir       string
	// contains filtered or unexported fields
}

func NewBuildPaver

func NewBuildPaver(bootserverPath, imageDir string, options ...BuildPaverOption) (*BuildPaver, error)

NewBuildPaver constructs a new paver that uses `bootserverPath` as the path to the tool used to pave Zedboot and Fuchsia with the image manifest located in `imageDir`. Also accepts a number of optional parameters.

func (*BuildPaver) Pave

func (p *BuildPaver) Pave(ctx context.Context, deviceName string) error

Pave runs a paver service for one pave and includes Zedboot. If `deviceName` is not empty, the pave will only be applied to the specified device.

func (*BuildPaver) PaveWithOptions

func (p *BuildPaver) PaveWithOptions(ctx context.Context, deviceName string, options Options) error

Pave runs a paver service for one pave. If `deviceName` is not empty, the pave will only be applied to the specified device.

type BuildPaverOption

type BuildPaverOption func(p *BuildPaver) error

func OverrideSlotA

func OverrideSlotA(imgPath string) BuildPaverOption

Sets a path to an image that the Paver will use to override the ZIRCON-A ZBI.

func OverrideVBMetaA

func OverrideVBMetaA(vbmetaPath string) BuildPaverOption

Sets the paths to the images that the Paver will use to override vbmeta_a.

func SSHPublicKey

func SSHPublicKey(publicKey ssh.PublicKey) BuildPaverOption

Sets the SSH public key that the Paver will bake into the device as an authorized key.

func Stdout

func Stdout(writer io.Writer) BuildPaverOption

Send stdout from the paver scripts to `writer`. Defaults to the parent stdout.

type Mode

type Mode int
const (
	Default Mode = iota
	ZedbootOnly
	SkipZedboot
)

type Options

type Options struct {
	Mode Mode
}

type Paver

type Paver interface {
	PaveWithOptions(ctx context.Context, deviceName string, options Options) error
	Pave(ctx context.Context, deviceName string) error
}

Jump to

Keyboard shortcuts

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