exec

package
v0.0.0-...-208c66a Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootImage

type BootImage interface {
	Load() error
	Entry() uint
	Boot(cleanup func()) error
}

BootImage represents a bootable image.

type ELFImage

type ELFImage struct {
	// Region is the memory area for image loading.
	Region *dma.Region
	// ELF is a bootable bare-metal ELF image.
	ELF []byte
	// contains filtered or unexported fields
}

ELFImage represents a bootable bare-metal ELF image.

func (*ELFImage) Boot

func (image *ELFImage) Boot(cleanup func()) (err error)

Boot calls a loaded bare-metal ELF image.

func (*ELFImage) Entry

func (image *ELFImage) Entry() uint

Entry returns the image entry address.

func (*ELFImage) Load

func (image *ELFImage) Load() (err error)

Load loads a bare-metal ELF image in memory.

The ELF loader is _very_ simple, suitable for loading unikernels like those produced by TamaGo.

type LinuxImage

type LinuxImage struct {
	// Region is the memory area for image loading.
	Region *dma.Region

	// Kernel is the Linux kernel image.
	Kernel []byte
	// KernelOffset is the Linux kernel offset from RAM start address.
	KernelOffset int

	// DeviceTreeBlob is the Linux kernel dtb file.
	DeviceTreeBlob []byte
	// DeviceTreeBlobOffset is the dtb offset from RAM start address.
	DeviceTreeBlobOffset int

	// InitialRamDisk is the Linux kernel initrd file.
	InitialRamDisk []byte
	// InitialRamDiskOffset is the initrd offset from RAM start address.
	InitialRamDiskOffset int

	// CmdLine is the Linux kernel command line arguments.
	CmdLine string
	// contains filtered or unexported fields
}

LinuxImage represents a bootable Linux kernel image.

func (*LinuxImage) Boot

func (image *LinuxImage) Boot(cleanup func()) (err error)

Boot calls a loaded Linux kernel image.

func (*LinuxImage) DTB

func (image *LinuxImage) DTB() uint

DTB returns the image DTB address.

func (*LinuxImage) Entry

func (image *LinuxImage) Entry() uint

Entry returns the image entry address.

func (*LinuxImage) Load

func (image *LinuxImage) Load() (err error)

Load loads a Linux kernel image in memory.

Jump to

Keyboard shortcuts

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