write_boot_simple

Function write_boot_simple 

Source
pub fn write_boot_simple<ObjectID: FsVerityHashValue>(
    repo: &Repository<ObjectID>,
    entry: BootEntry<ObjectID>,
    root_id: &ObjectID,
    insecure: bool,
    boot_partition: &Path,
    boot_subdir: Option<&str>,
    entry_id: Option<&str>,
    cmdline_extra: &[&str],
) -> Result<()>
Expand description

Writes boot entry to the boot partition

§Arguments

  • repo - The composefs repository
  • entry - Boot entry variant to be written
  • root_id - The content hash of the generated EROFS image id
  • insecure - Make fs-verity validation optional in case the filesystem doesn’t support it, indicated by composefs=?hash cmdline argument
  • boot_partition - Path to the boot partition/directory
  • boot_subdir - If Some(path), the path is prepended to initrd and linux keys in the BLS entry

For example, if boot_partition = "/boot" and boot_subdir = Some("1") , the BLS entry will contain

linux /boot/1/<entry_id>/linux
initrd /boot/1/<entry_id>/initrd

If boot_partition = "/boot" and boot_subdir = None , the BLS entry will contain

linux /<entry_id>/linux
initrd /<entry_id>/initrd
  • entry_id - In case of a BLS entry, the name of file to be generated in loader/entries
  • cmdline_extra - Extra kernel command line arguments