Upload a binary file
If you want to upload large binary files (up to 15 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
:
-
Make sure you have the latest version of the
garage-sign
tool. -
Get the .zip file with your provisioning credentials.
For instructions, see the related section in this guide.
-
Initialize a local repository.
For safety reasons, we recommend keeping your local repository on an external storage device. garage-sign init \ --repo <localreponame> \ --credentials </path/to/credentials.zip>
-
Pull the latest version of the
targets.json
file.garage-sign targets pull \ --repo <localreponame>
-
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>
Not to check if the file is in targets, run the command with the --force
option.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 thetargets add-uploaded
command. -
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>
If you need to verify the integrity of the previously uploaded target before adding it to the metadata, use the --verifyIntegrity
option. -
Sign the new
targets.json
file with your Targets key.garage-sign targets sign \ --repo <localreponame> \ --key-name mytargets
-
Push the new
targets.json
file to OTA Connect.The size of the targets.json file cannot be larger than 8,286,208 bytes (approximately 8 MB). When targets.json reaches 75% of its size limit, you get a warning message after each push to the server. When the limit is reached, new software versions cannot be uploaded. In this case, delete unnecessary versions. garage-sign targets push \ --repo <localreponame>
To learn more about the garage-sign
commands and options, see its reference documentation.