Documentation
¶
Overview ¶
Package packer builds and deploys a gokrazy image.
Index ¶
- Constants
- Variables
- func FindConfig(explicit string) (string, error)
- func FindExtraFiles(cfg *config.Struct) (map[string][]*FileInfo, error)
- func FindModuleRoot(dir string) (string, error)
- func PermSizeInKB(firstPartitionOffsetSectors int64, devsize uint64) uint32
- type BuildTimestampOverrideKey
- type Env
- type FileHash
- type FileInfo
- type GoPackage
- type Logger
- type Output
- type OutputType
- type Pack
- type PackerPack
- type SBOM
- type SBOMWithHash
Constants ¶
View Source
const MB = 1024 * 1024
Variables ¶
View Source
var ( FAT = byte(0xc) Linux = byte(0x83) )
View Source
var BuildTimestampOverride = BuildTimestampOverrideKey{}
Functions ¶
func FindConfig ¶
FindConfig discovers config.json by walking up from cwd (or using the explicit path).
func FindModuleRoot ¶
FindModuleRoot walks up from dir to find go.mod.
func PermSizeInKB ¶
Types ¶
type BuildTimestampOverrideKey ¶
type BuildTimestampOverrideKey struct{}
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env holds the environment for a Pack operation.
type Output ¶
type Output struct {
Type OutputType
Path string
}
Output holds overwrite output config.
type OutputType ¶
type OutputType string
OutputType distinguishes between full disk image and gaf.
const ( OutputTypeFull OutputType = "full" OutputTypeGaf OutputType = "gaf" )
type Pack ¶
type Pack struct {
Env Env
Cfg *config.Struct
FileCfg *config.Struct // cfg before internal modifications
Pack PackerPack
Output *Output
// contains filtered or unexported fields
}
Pack is the core packer state.
type PackerPack ¶
type PackerPack struct {
Partuuid uint32
UsePartuuid bool
UseGPTPartuuid bool
UseGPT bool
ExistingEEPROM struct {
PieepromSHA256 string
VL805SHA256 string
}
FirstPartitionOffsetSectors int64
}
PackerPack represents one pack process (partition-level).
func NewPackForHost ¶
func NewPackForHost(firstPartitionOffsetSectors int64, hostname string) PackerPack
func (*PackerPack) GPTPARTUUID ¶
func (p *PackerPack) GPTPARTUUID(partition uint16) string
func (*PackerPack) ModifyCmdlineRoot ¶
func (p *PackerPack) ModifyCmdlineRoot() bool
func (*PackerPack) PermUUID ¶
func (p *PackerPack) PermUUID() string
func (*PackerPack) RereadPartitions ¶
func (p *PackerPack) RereadPartitions(o *os.File) error
func (*PackerPack) Root ¶
func (p *PackerPack) Root() string
type SBOMWithHash ¶
Click to show internal directories.
Click to hide internal directories.