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. To initialize a local repository, specify a name and the path to the .zip file with your provisioning credentials.

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

    garage-sign targets pull \
      --repo <localreponame>
  5. Upload your binary file to your local repository and specify the name and version of your targets.json file.

    You can find the name and version fields in the targets.json file under the custom field, as shown in the example.
    garage-sign targets upload \
      --repo <localreponame> \
      --input </path/to/binary-file.bin> \
      --name <name-of-target> \
      --version <target-version>
  6. If the upload is successful, in the targets.json file, specify the following metadata about the binary file: name, version, and types of hardware for which your binary file is intended, as shown in the example.

    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>