Documentation ¶
Index ¶
- func AddManifest(m Manifest)
- func Boot(conf *RapidosConf, imgPath string, pidsDir string) error
- func Cut(conf *RapidosConf, m *Manifest, rdir string, imgPath string) error
- func FindBins(binNames []string, ignoreMissing bool) ([]string, error)
- func FindKmods(conf *RapidosConf, kmodNames []string) ([]string, error)
- func IterateManifests(cb func(m Manifest))
- func RenderManifest(conf RapidosConf, m *Manifest) error
- func ValidateMemStr(mem string) error
- type Inventory
- type KmodsInfo
- type Manifest
- type RapidosConf
- func (conf *RapidosConf) DumpConf()
- func (conf *RapidosConf) GenGob() (*bytes.Buffer, error)
- func (conf *RapidosConf) GetDirPath(key string) (string, error)
- func (conf *RapidosConf) GetKernImgPath() (string, error)
- func (conf *RapidosConf) GetKmodsInfo() (*KmodsInfo, error)
- func (conf *RapidosConf) GetQEMUExtraArgs() ([]string, error)
- func (conf *RapidosConf) GetVMDef(vmIndex int) (*RapidosConfVM, error)
- type RapidosConfVM
- type Resources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddManifest ¶
func AddManifest(m Manifest)
XXX this is called by manifest init() functions, so should panic on error.
func IterateManifests ¶
func IterateManifests(cb func(m Manifest))
func RenderManifest ¶
func RenderManifest(conf RapidosConf, m *Manifest) error
finalize inventory for manifest based on current conf
Types ¶
type Inventory ¶
type Inventory struct { // init package runs immediately following boot.. // The stock u-root init process is responsible for invoking the "uinit" // provided with a given manifest Init string // Additional go packages to install in the initramfs Pkgs []string // kernel modules required by this init Kmods []string // Binaries to locate via PATH (and sbin). The initramfs destination // will match the local source, with ldd dependencies also pulled in. Bins []string // files to include in the initramfs image. ldd dependencies will be // automatically pulled in alongside binaries. // Files will be placed in the same path as the local source by default. // The initramfs destination path can be explicitly specified via: // <local source>:<initramfs dest> // TODO use u-root/cmds/which to locate bins under PATH (+sbin) Files []string }
type Manifest ¶
type Manifest struct { // Name of init back-end Name string // short description of what this image does Descr string // u-root builder type. "bb" (default), "binary" or "source" Builder string // inventory includes a list of all image dependencies Inventory Inventory // optional callback which can update Inventory based on the provided // config. InventoryCB func(RapidosConf, *Inventory) error // VMResources are different from the rest of the Manifest in that they are // considered at VM boot time. VMResources Resources }
func LookupManifest ¶
type RapidosConf ¶
type RapidosConf struct { // command line Debug bool // contains filtered or unexported fields }
func (*RapidosConf) DumpConf ¶
func (conf *RapidosConf) DumpConf()
func (*RapidosConf) GetDirPath ¶
func (conf *RapidosConf) GetDirPath(key string) (string, error)
func (*RapidosConf) GetKernImgPath ¶
func (conf *RapidosConf) GetKernImgPath() (string, error)
func (*RapidosConf) GetKmodsInfo ¶
func (conf *RapidosConf) GetKmodsInfo() (*KmodsInfo, error)
func (*RapidosConf) GetQEMUExtraArgs ¶
func (conf *RapidosConf) GetQEMUExtraArgs() ([]string, error)
func (*RapidosConf) GetVMDef ¶
func (conf *RapidosConf) GetVMDef(vmIndex int) (*RapidosConfVM, error)
type RapidosConfVM ¶
type Resources ¶
type Resources struct { // Whether the VM should be connected to the Rapidos bridge network Network bool // Number of SMP virtual CPUs to assign to the VM (QEMU uses a single // vCPU by default). CPUs uint8 // Amount of memory to assign to the VM (use QEMU default when not set). // This value is MiB by default, but can be specified with an explicit // M or G suffix Memory string }
Click to show internal directories.
Click to hide internal directories.