bootimg

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package bootimg builds the BIOS initramfs and El Torito ISO.

Index

Constants

This section is empty.

Variables

BakedPath is where fortress.yml lands in the initramfs: the edge reads it as config.BakedFile.

Functions

func Bake

func Bake(dest, src string, edge []byte) error

Bake writes dest: the ISO at src with fortress.yml added to its initramfs. The kernel unpacks concatenated archives in order, so the file is a second gzip cpio appended to the release's; the kernel, the edge binary, and the boot loader are copied unchanged. dest carries src's date, so the same src and fortress.yml give the same bytes.

func SourceDateEpoch

func SourceDateEpoch() (time.Time, error)

SourceDateEpoch is $SOURCE_DATE_EPOCH, the reproducible-builds way to fix the time a build writes, or now when it is not set.

func VolumeTime

func VolumeTime(path string) (time.Time, error)

VolumeTime is when the ISO at path says it was made: its primary volume descriptor's modification date. Bake stamps its copy with it, so a release baked with the same fortress.yml gives the same bytes.

func WriteISO

func WriteISO(dest, kernel, initrd, isolinux, ldlinux string, at time.Time) error

WriteISO writes a BIOS El Torito ISO. isolinux and ldlinux are the syslinux files (isolinux.bin, ldlinux.c32). The image boots as a CD; it is not a hybrid USB image. Every date in it is at, so the same files at the same time give the same bytes, on any machine.

func WriteInitramfs

func WriteInitramfs(dest, binPath, caPath, modules string) error

WriteInitramfs writes a gzip newc cpio: /init, the CA bundle, and any kernel modules in modules (*.ko or *.ko.gz). modules may be empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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