Function

FwupdPlugincommon_firmware_builder

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:

  1. The bytes data is untarred to a temporary location
  2. A bubblewrap container is set up
  3. The startup.sh script is run inside the container
  4. The firmware.bin is extracted from the container
  5. The temporary location is deleted.
Available since:0.9.7

Parameters

bytes GBytes*
 

The data to use.

 The data is owned by the caller of the function.
script_fn const gchar*
 

Name of the script to run in the tarball, e.g. startup.sh

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
output_fn const gchar*
 

Name of the generated firmware, e.g. firmware.bin

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: GBytes*
 

A new GBytes, or NULL for error.

 The caller of the function takes ownership of the data, and is responsible for freeing it.