Skip to content

Commit

Permalink
config: define MountDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
stapelberg committed May 10, 2024
1 parent cfc6cfe commit a48c0b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ type PackageConfig struct {
ExtraFileContents map[string]string `json:",omitempty"`
}

// MountDevice instructs gokrazy to mount the specified source on the specified
// target using the specified file system type and the specified options.
//
// If Target contains a directory in /mnt (not a subdirectory), the packer will
// create it on the (read-only) root file system.
type MountDevice struct {
Source string // e.g. /dev/sdx or PARTUUID=abcdef
Type string // e.g. ext4
Target string // e.g. /mnt/usb, will be created by the packer
Options string // a subset of mount(8)-like options
}

// Fields where we need to distinguish between not being set (= use the default)
// and being set to an empty value (= disable), such as FirmwarePackage, are
// pointers. Fields that are required (Hostname) or where the empty value is not
Expand Down Expand Up @@ -168,6 +180,8 @@ type Struct struct {
// https://www.raspberrypi.com/documentation/computers/config_txt.html
BootloaderExtraLines []string `json:",omitempty"`

MountDevices []MountDevice `json:",omitempty"`

// Do not set these manually in config.json, these fields only exist so that
// the entire old gokr-packer flag surface keeps working.
InternalCompatibilityFlags *InternalCompatibilityFlags `json:",omitempty"`
Expand Down

0 comments on commit a48c0b9

Please sign in to comment.