ramfs

package
v0.0.0-...-7eb602e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DevCPIO = []cpio.Record{
	{Info: cpio.Info{Name: "tcz", Mode: d | 0755}},
	{Info: cpio.Info{Name: "etc", Mode: d | 0755}},
	{Info: cpio.Info{Name: "dev", Mode: d | 0755}},
	{Info: cpio.Info{Name: "ubin", Mode: d | 0755}},
	{Info: cpio.Info{Name: "usr", Mode: d | 0755}},
	{Info: cpio.Info{Name: "usr/lib", Mode: d | 0755}},
	{Info: cpio.Info{Name: "lib64", Mode: d | 0755}},
	{Info: cpio.Info{Name: "bin", Mode: d | 0755}},
	{Info: cpio.Info{Name: "dev/console", Mode: c | 0600, Rmajor: 5, Rminor: 1}},
	{Info: cpio.Info{Name: "dev/tty", Mode: c | 0666, Rmajor: 5, Rminor: 0}},
	{Info: cpio.Info{Name: "dev/null", Mode: c | 0666, Rmajor: 1, Rminor: 3}},
	{Info: cpio.Info{Name: "dev/port", Mode: c | 0640, Rmajor: 1, Rminor: 4}},
	{Info: cpio.Info{Name: "dev/urandom", Mode: c | 0666, Rmajor: 1, Rminor: 9}},
	{Info: cpio.Info{Name: "etc/resolv.conf", Mode: f | 0644, FileSize: uint64(len(nameserver))}, ReadCloser: cpio.NewBytesReadCloser([]byte(nameserver))},
	{Info: cpio.Info{Name: "etc/localtime", Mode: f | 0644, FileSize: uint64(len(gmt0))}, ReadCloser: cpio.NewBytesReadCloser([]byte(gmt0))},
}

devCPIOrecords are cpio records as defined in the uroot cpio package. Most of the bits can be left unspecified: these all have one link, they are mostly root:root, for example.

Functions

This section is empty.

Types

type Initramfs

type Initramfs struct {
	cpio.Writer
	// contains filtered or unexported fields
}

func NewInitramfs

func NewInitramfs(w cpio.Writer) (*Initramfs, error)

func (*Initramfs) WriteFile

func (i *Initramfs) WriteFile(src string, dest string) error

func (*Initramfs) WriteFiles

func (i *Initramfs) WriteFiles(srcDir string, destDir string, files []string) error

Copy all files relative to `srcDir` to `destDir` in the cpio archive.

func (*Initramfs) WriteRecord

func (i *Initramfs) WriteRecord(r cpio.Record) error

Jump to

Keyboard shortcuts

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