-
Notifications
You must be signed in to change notification settings - Fork 458
/
board.go
31 lines (26 loc) · 908 Bytes
/
board.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package runtime
import "github.com/siderolabs/go-procfs/procfs"
// PartitionOptions are the board specific options for customizing the
// partition table.
type PartitionOptions struct {
PartitionsOffset uint64
}
// BoardInstallOptions are the board specific options for installation of various boot assets.
type BoardInstallOptions struct {
InstallDisk string
MountPrefix string
DTBPath string
UBootPath string
RPiFirmwarePath string
Printf func(string, ...any)
}
// Board defines the requirements for a SBC.
type Board interface {
Name() string
Install(options BoardInstallOptions) error
KernelArgs() procfs.Parameters
PartitionOptions() *PartitionOptions
}