init

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package init implements early userspace logic in go, replacing the functionality of initramfs's /init. It does the normal things such as decoding

real_root=UUID=nnnnnn

but also checks that the unit can/should boot in normal mode. It will display a menu on the attached LCD. This menu allows the user to initiate factory restore to the latest image, to a particular image, etc.

Impacted by build tags mfg, release, erase_integ.

Index

Constants

View Source
const (
	Choice_resume cfa.Choice = iota
	Choice_poweroff

	Choice_FR_latest
	Choice_FR_original
	Choice_FR_choose

	Choice_erase
	CHOICE_LAST
)

Variables

This section is empty.

Functions

func BBSymlinks()

set up busybox symlinks

func CreateDirs

func CreateDirs()

func EarlyMounts

func EarlyMounts()

create /sys, /dev, /proc (etc) mounts

func EarlyUmounts

func EarlyUmounts()

unmount everything mounted by EarlyMounts

func Init

func Init()

Calling Init() is equivalent to running the old /init shell script.

func LdConfig

func LdConfig()

update ld.so.cache

func QuietPrintk

func QuietPrintk()

prevent unimportant kernel messages from spamming the console

Types

type KeyLoader

type KeyLoader interface {
	LoadKey()
}

Loads an encryption key into the kernel keyring

Directories

Path Synopsis
Package consts contains init-related consts so they can be shared outside of pkg init.
Package consts contains init-related consts so they can be shared outside of pkg init.
Package housekeeping works with lists of tasks to be performed in the future.
Package housekeeping works with lists of tasks to be performed in the future.
Provides feedback on the LCD that the boot is progressing.
Provides feedback on the LCD that the boot is progressing.

Jump to

Keyboard shortcuts

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