fdt

package
v0.0.0-...-759cef8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BEGIN_NODE = 0x1
	END_NODE   = 0x2
	PROP       = 0x3
	NOP        = 0x4
	END        = 0x9
)

Variables

View Source
var (
	ErrHeader = errors.New("fdt: invalid header")
)

Functions

func WriteDTS

func WriteDTS(w io.Writer, f *File) error

Types

type File

type File struct {
	Header
	Reserves []Reserve
	Root     *Node
	Strings  []string
}

func Decode

func Decode(r io.ReaderAt) (*File, error)
type Header struct {
	Magic           uint32
	Size            uint32
	StructOff       uint32
	StringsOff      uint32
	ReserveOff      uint32
	Version         uint32
	LastCompVersion uint32
	BootCpuid       uint32
	StringsSize     uint32
	StructSize      uint32
}

type Node

type Node struct {
	Name     string
	Prop     []Prop
	Parent   *Node
	Children []*Node
}

type Prop

type Prop struct {
	Name  string
	Value interface{}
}

type Reserve

type Reserve struct {
	Addr uint64
	Size uint64
}

Jump to

Keyboard shortcuts

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