Function
FwupdPlugincommon_firmware_builder
since: 0.9.7
Declaration [src]
GBytes*
fu_common_firmware_builder (
GBytes* bytes,
const gchar* script_fn,
const gchar* output_fn,
GError** error
)
Description [src]
Builds a firmware file using tools from the host session in a bubblewrap jail. Several things happen during build:
- The
bytesdata is untarred to a temporary location - A bubblewrap container is set up
- The startup.sh script is run inside the container
- The firmware.bin is extracted from the container
- The temporary location is deleted.
Available since: 0.9.7
Parameters
bytes-
Type:
GBytesThe data to use.
The data is owned by the caller of the function. script_fn-
Type:
const gchar*Name of the script to run in the tarball, e.g.
startup.shThe data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. output_fn-
Type:
const gchar*Name of the generated firmware, e.g.
firmware.binThe data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will left initialized to NULLby the function if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GBytes
A new GBytes, or NULL for error.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |