Skip to main content

Module initramfs

Module initramfs 

Source
Expand description

Real initramfs builder producing valid cpio archives (newc format).

The cpio “newc” (SVR4 with no CRC) format is what the Linux kernel expects for initramfs archives. Each entry consists of a 110-byte ASCII header followed by the filename (NUL-terminated, padded to 4-byte boundary), followed by the file data (padded to 4-byte boundary).

The archive is terminated by a trailer entry with the name “TRAILER!!!”.

Structs§

CpioBuilder
A builder for creating cpio newc archives suitable for Linux initramfs.

Functions§

build_initramfs
Build a complete initramfs with standard directory structure and an /init script.
default_init_script
Default /init script that mounts essential filesystems, configures networking, and starts services.
parse_cpio_entries
Parse a cpio newc archive and return the list of entries.