pieeprom

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package pieeprom provides interface ot the Raspberry Pi bootloader EEPROM.

Index

Constants

View Source
const ProcfsBootloaderBuildTimestamp = "/proc/device-tree/chosen/bootloader/build-timestamp"

ProcfsBootloaderBuildTimestamp denotes a device tree file containing the build timestamp of the firmware.

Variables

View Source
var (
	// TryBootFeatureSince is the initial build timestamp since the tryboot.txt feature is supported.
	TryBootFeatureSince = time.Date(2020, time.December, 11, 11, 15, 17, 0, time.UTC)
)

Functions

func BuildTimestamp

func BuildTimestamp(name string) (time.Time, error)

BuildTimestamp returns the build date of the firmware as read from the given file.

The format of the timestamp is a 32bit big-endian signed integer representing seconds since UNIX epoch. Pass ProcfsBootloaderBuildTimestamp as the filename to load the timestamp from the device tree of a running system.

On a device without EEPROM-based bootloader, this will fail with fs.ErrNotExist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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