Scroll to navigation

swugenerator() swugenerator()

NAME

swugenerator - generate SWUpdate bundles from a manifest

Name

swugenerator -

A host tool to generate SWU update package for SWUpdate.

SYNOPSIS


Generator SWU Packages for SWUpdate

{create,sign} command to be executed
create creates a SWU file sign signs an existing SWU file provided by -i


show this help message and exit
AES Key to encrypt artifacts
Do not compress files
Do not encrypt files
Do not generate IV when encrypting
Do not store sha256 hash in sw-description
RSA key or certificate to sign the SWU
sw-description template for the create command
Encrypt sw-description
list of directories where artifacts are searched
SWU output file
SWU input file to be signed for the sign command
configuration file


Description

swugenerator is a tool running on host to create and modify SWUpdate's Update files (SWU). SWU file contains a meta description of the release (sw-description), and swugenerator adds components to a template passed from command line. This tool requires openssl to run and to sign the SWU. It is goal of the tool to fill the gap with Yocto/OE, where SWU generation is done by classes in the meta-swupdate layer, but other buildsystems like Debian or Buildroot have no tools to create a SWU.

The tool signs the SWU and can encrypt the artifacts. The tool parses the libconf based sw-description (tool does not work for JSON based sw-description) and provides the following features:

  • replace occurrencies of variables found in the CONFIG file
  • add sha256 to each artifact
  • check if an artifact should be encrypted and encrypts it
  • sign sw-description with one of the methods accepted by SWUpdate
  • pack all artifacts into a SWU file



It maybe run in two steps to create an unsigned swu file and then sign it later in a second call:

swugenerator -o output.swu -a . -s sw-description.in create
swugenerator -o signed_output.swu -i output.swu -k CMS,key.pem,ca.crt sign


Installation

To install swugenerator clone the repository, and from the main project folder run pip (pip3 required): For new Linux distributions, replace it with pipx.

pip install .


To uninstall:

pip uninstall swugenerator