bootc

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: GPL-2.0, GPL-2.0-or-later Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Mach         = "mk1"
	Machine      = "platina-" + Mach
	CorebootName = "coreboot-" + Machine + ".rom"
)
View Source
const (
	CLASS    string = "register"
	BSTAT    string = "bootstatus"
	RDCFG    string = "invadercfg"
	REGIS    string = "invader"
	UNREG    string = "unregister"
	TESTENB  bool   = true
	TESTIP   string = "192.168.101.142"
	TESTPORT string = "8081"
	TESTSN   string = "12345678"
)
View Source
const (
	Register       = "register"
	NumClients     = "getnumclients"
	ClientData     = "getclientdata"
	ClientBootData = "getclientbootdata"
	Script         = "getscript"
	Binary         = "getbinary"
	DumpVars       = "dumpvars"
)
View Source
const (
	BootStateNotRegistered = iota
	BootStateRegistered
	BootStateBooting
	BootStateUp
	BootStateInstalling
	BootStateIntstallFailed
	BootStateRebooting
)
View Source
const (
	InstallStateFactory = iota
	InstallStateInProgress
	InstallStateInstalled
	InstallStateInstallFail
	InstallStateFactoryInProgress
	InstallStateFactoryFailed
)
View Source
const (
	RegReplyRegistered = iota
	RegReplyNotRegistered
)
View Source
const (
	ScriptBootLatest = iota
	ScriptBootKnownGood
	ScriptInstallDebian
)
View Source
const (
	BootReplyNormal = iota
	BootReplyRunGoesScript
	BootReplyExecUsermode
	BootReplyExecKernel
	BootReplyReflashAndReboot
)
View Source
const (
	Debian = iota
)

Variables

View Source
var BootcCfgFile string
View Source
var ClientBootCfg map[string]*BootcConfig
View Source
var ClientCfg map[string]*Client

Functions

func Bootc

func Bootc() []string

func Copy

func Copy(src string, dst string) error

func ResetSda6Count

func ResetSda6Count() error

func SetSda1I

func SetSda1I(x string) error

func SetSda1K

func SetSda1K(x string) error

func SetSda6I

func SetSda6I(x string) error

func SetSda6K

func SetSda6K(x string) error

func UpdateBootcCfg

func UpdateBootcCfg(k, i string) error

func Wipe

func Wipe(dryrun bool) error

Types

type BinaryReply

type BinaryReply struct {
	Binary []byte
	Error  error
}

type BootReply

type BootReply struct {
	Reply      int
	ImageName  string
	Script     string
	ScriptType string
	Binary     []byte
	Error      error
}

type BootReq

type BootReq struct {
	Images []string
}

type BootcConfig

type BootcConfig struct {
	Install         bool
	BootSda1        bool
	BootSda6Cnt     int
	EraseSda6       bool
	IAmMaster       bool
	MyIpAddr        string
	MyGateway       string
	MyNetmask       string
	MasterAddresses []string
	ReInstallK      string
	ReInstallI      string
	ReInstallC      string
	Sda1K           string
	Sda1I           string
	Sda1C           string
	Sda6K           string
	Sda6I           string
	Sda6C           string
	ISO1Name        string
	ISO1Desc        string
	ISO2Name        string
	ISO2Desc        string
	ISOlastUsed     int
	PostInstall     bool
	ConfigVersion   int
	PortNumber      string
	Disable         bool
	PccEnb          bool
	PccIP           string
	PccPort         string
	PccSN           string
}
var Cfg BootcConfig

type Client

type Client struct {
	Unit            int
	Name            string
	Machine         string
	MacAddr         string
	IpAddr          string
	IpGWay          string
	IpMask          string
	BootState       int
	InstallState    int
	AutoInstall     bool
	CertPresent     bool
	DistroType      int
	TimeRegistered  string
	TimeInstalled   string
	InstallCounter  int
	LastISOname     string
	LastISOdesc     string
	GoesVersion     string
	KernelVersion   string
	GoesBootVersion string
}

type ClntDataReply

type ClntDataReply struct {
	Client
	Error error
}

type Command

type Command struct {
	// Machines may use Hook to run something before redisd and other
	// daemons.
	Hook func() error

	// Machines may use ConfHook to run something after all daemons start
	// and before source of start command script.
	ConfHook func() error

	// GPIO init hook for machines than need it
	ConfGpioHook func() error
	// contains filtered or unexported fields
}

func New

func New() *Command

func (Command) Apropos

func (Command) Apropos() lang.Alt

func (*Command) Goes

func (c *Command) Goes(g *goes.Goes)

func (*Command) Main

func (c *Command) Main(args ...string) (err error)

func (Command) Man

func (Command) Man() lang.Alt

func (Command) String

func (Command) String() string

func (Command) Usage

func (Command) Usage() string

type IMGINFO

type IMGINFO struct {
	Name   string
	Build  string
	User   string
	Distro string
	Size   string
	Tag    string
	Fe1    string
	Fe1Fw  string
	Extra  string
	Commit string
	Chksum string
}

type NumClntReply

type NumClntReply struct {
	Clients int
	Error   error
}

type PCC

type PCC struct {
	// contains filtered or unexported fields
}

type RegReply

type RegReply struct {
	Reply   int
	TorName string
	Error   error
}

type RegReq

type RegReq struct {
	Mac string
	IP  string
}

type ScriptReply

type ScriptReply struct {
	Script []string
	Error  error
}

Jump to

Keyboard shortcuts

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