FwupDelta (Fwup delta v0.1.0)

Generate delta firmware files based on input source and target firmwares.

Summary

Types

On delta creation we get a file, we get some size information and we get any tool metadata that we should store about the delta archive. Maybe minimum required tool version for example.

Types

confirmed_path()

@type confirmed_path() :: String.t()

delta_created()

@type delta_created() :: %{
  filepath: String.t(),
  size: non_neg_integer(),
  source_size: non_neg_integer(),
  target_size: non_neg_integer(),
  fwup_metadata: map()
}

On delta creation we get a file, we get some size information and we get any tool metadata that we should store about the delta archive. Maybe minimum required tool version for example.

firmware()

@type firmware() :: {:url, String.t()} | {:local, String.t()}

Functions

do_generate(source_path, target_path, output_path, work_dir)

@spec do_generate(
  source_path :: String.t(),
  target_path :: String.t(),
  output_path :: String.t(),
  work_dir :: String.t()
) :: {:ok, delta_created()} | {:error, term()}

generate(source, target)

@spec generate(firmware(), firmware()) :: {:ok, delta_created()} | {:error, term()}