Documentation ¶
Index ¶
- func Boot(ctx context.Context, t tftp.Client, imgs []Image, cmdlineArgs []string, ...) error
- func ValidateBoard(ctx context.Context, t tftp.Client, boardName string) error
- type Image
- func ConvertFromBuildImages(buildImages []build.Image, bootMode Mode, imageDir string) ([]Image, func() error, error)
- func GetImages(ctx context.Context, imageManifest string, bootMode Mode) ([]Image, func() error, error)
- func ImagesFromGCS(ctx context.Context, manifest *url.URL, bootMode Mode) ([]Image, func() error, error)
- func ImagesFromLocalFS(manifest string, bootMode Mode) ([]Image, func() error, error)
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Image ¶
type Image struct { // Name is an identifier for this image that usually derives from its target partition. // TODO(fxbug.dev/38517): Remove when BootZedbootShim is deprecated. Name string // Path is the location of the image on disk. // TODO(ihuh): Remove when bootserver/cmd/main.go no longer uses it. Path string // Reader is a reader to the image. Reader io.ReaderAt // Size is the size of the reader in bytes. Size int64 // Args correspond to the bootserver args that map to this image type. Args []string }
Image is a fuchsia image as viewed by bootserver; a simplified version of build.Image.
func ConvertFromBuildImages ¶
func ConvertFromBuildImages(buildImages []build.Image, bootMode Mode, imageDir string) ([]Image, func() error, error)
ConvertFromBuildImages filters and returns Images corresponding to build Images of a given bootMode.
func GetImages ¶
func GetImages(ctx context.Context, imageManifest string, bootMode Mode) ([]Image, func() error, error)
GetImages parses the imageManifest and gets a list of images with readers to each image. It returns the images as well as a func to close the image readers.
func ImagesFromGCS ¶
func ImagesFromGCS(ctx context.Context, manifest *url.URL, bootMode Mode) ([]Image, func() error, error)
ImagesFromGCS returns Images of a given bootMode that exist in GCS. The image paths provided in the manifest at the given url are expected to be relative paths to the same directory of the manifest.
type Mode ¶
type Mode int
Mode determines the arguments to use when booting/paving images.
const ( // ModeNull is a null default that can be error checked against. ModeNull Mode = iota // ModePave is a directive to pave when booting. ModePave // ModeNetboot is a directive to netboot when booting. ModeNetboot // ModePaveZedboot is a directive to pave zedboot to partition A (the initial boot partition) when booting. ModePaveZedboot )
Click to show internal directories.
Click to hide internal directories.