class CommandlineBootloaderFileItem

Defined at line 26 of file ../../src/firmware/lib/boot-shim-utils/include/lib/boot-shim-utils/commandline-bootloader-file-item.h

Custom item to construct a `ZBI_TYPE_BOOTLOADER_FILE` item from Base64-encoded commandline args.

Useful for device bootloaders which do not support standard OEM commands for staging bootloader

files (such as SSH keys), but do provide the ability to register custom commandline arguments.

The file data may be split across multiple commandline args with the given prefix.

Example:

* prefix = "ssh_creds=", filename = "ssh.authorized_keys"

* commandline: "ssh_creds=Zm9vIGJ ssh_creds=hciBiYXo=" ("Zm9vIGJhciBiYXo=" -> "foo bar baz")

* payload: name = "ssh.authorized_keys", contents = "foo bar baz"

Public Methods

void Init (std::string_view cmdline, std::string_view prefix, std::string_view filename)

Stores `cmdline`, `prefix`, and `filename` for processing during shim execution.

Defined at line 56 of file ../../src/firmware/lib/boot-shim-utils/commandline-bootloader-file-item.cc

size_t size_bytes ()

Required `boot_shim::ItemBase` functions.

Defined at line 67 of file ../../src/firmware/lib/boot-shim-utils/commandline-bootloader-file-item.cc

fit::result<DataZbi::Error> AppendItems (DataZbi & zbi)

Defined at line 77 of file ../../src/firmware/lib/boot-shim-utils/commandline-bootloader-file-item.cc