OTA Connect Developer Guide

Upload a binary file

If you want to upload large binary files (up to 3 GB) or your software signing keys are offline, use the garage-sign tool on the command line.

You can upload software packages of up to 1 GB on the OTA Connect Portal. For instructions, see Upload software versions in the OTA Connect User Guide.

To upload a binary file using garage-sign:

  1. Make sure you have the latest version of the garage-sign tool.

  2. Get the .zip file with your provisioning credentials.

    For instructions, see the related section in this guide.

  3. Initialize a local repository.

    garage-sign init \
      --repo <localreponame> \
      --credentials </path/to/credentials.zip>
  4. Pull the latest version of the targets.json file.

    garage-sign targets pull \
      --repo <localreponame>
  5. To upload your binary to OTA Connect, specify its name and version.

    garage-sign targets upload \
      --repo <localreponame> \
      --input </path/to/binary-file.bin> \
      --name <name-of-target> \
      --version <target-version>

    Note that this will not make the binary available on its own. After the upload completes successfully, add it to your targets.json file using the targets add-uploaded command.

  6. If the upload is successful, add it to your local Targets metadata.

    The binary name and version must be the same as in step 5.

    garage-sign targets add-uploaded \
      --repo <localreponame> \
      --input </path/to/binary-file.bin> \
      --name <name-of-target> \
      --version <target-version> \
      --hardwareids <hardware-id1>,<hardware-id2>
  7. Sign the new targets.json file with your Targets key.

    garage-sign targets sign \
      --repo <localreponame> \
      --key-name mytargets
  8. Push the new targets.json file to OTA Connect.

    garage-sign targets push \
      --repo <localreponame>

To learn more about the garage-sign commands and options, see its reference documentation.