initramfs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package initramfs provides functionality to generate an archive, which can be extracted by the Linux kernel when the kernel boots up.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bluebox

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

func New

func New() *Bluebox

New constructs Bluebox with default values.

func (*Bluebox) Embed

func (b *Bluebox) Embed(file string) error

Embed adds file into the resulting archive but does not add it for execution by the init program.

func (*Bluebox) Execute

func (b *Bluebox) Execute(executable string, args ...string) error

Execute embeds executable into the resulting archive and passes arg as arguments to its execution instruction.

func (*Bluebox) Generate

func (b *Bluebox) Generate(archive io.Writer) error

Generate writes the configured initramfs archive to a file. Otherwise an error is returned. To do so it first auto generates a init program from the given parameters and compiles it before placing it into archive.

func (*Bluebox) Setarch

func (b *Bluebox) Setarch(arch string) error

Setarch sets the architecture for the generated initramfs archive. If the architecture is not part of GOARCH an error will be returned. By default the architecture of the host is used.

func (*Bluebox) Setenv

func (b *Bluebox) Setenv(key, value string)

Setenv sets the value of the environment variable named by the key.

Jump to

Keyboard shortcuts

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