Skip to main content

build_initramfs

Function build_initramfs 

Source
pub fn build_initramfs(
    services: &[&str],
    extra_binaries: &[(&str, &[u8])],
) -> Result<Vec<u8>, KernelError>
Expand description

Build a complete initramfs with standard directory structure and an /init script.

services are the names of services to start in the init script (e.g., “sshd”, “rvf-server”).

extra_binaries are (archive_path, content) pairs for additional binaries to include (e.g., (“bin/busybox”, &busybox_bytes)).

Returns a gzipped cpio archive.