Generate OTA Artifact using Allxon CLI (Windows)

Introduction

OTA artifacts, generated with Allxon CLI for Over-The-Air updates, are comprehensive packages that support mass updates of various media types, firmware, drivers, containers, and image files. etc. With just four simple steps, you can ensure the success of OTA updates across your remote edge AI device fleets.

What you will need

  1. Allxon CLI on the Edge Device

    Allxon CLI is a command-line interface that enables communication with the installed Allxon Agent, facilitating tasks such as generating OTA artifacts. For more information on its usage, please visit the GitHub page.

    Allxon CLI is automatically installed when you install Allxon Agent on your edge AI devices. If you haven’t installed it yet, follow the instructions here.

    If you have already installed Allxon Agent, you can use the following commands in PowerShell to check Allxon CLI version:

    1. Open PowerShell as administrator

    2. Enter the following command to navigate to the directory:
      $ cd ‘C:\Program Files\allxon-cli\bin\’
      $ .\allxon-cli.exe version

     

  2. Allxon Hello OTA Example 

    To get started, we recommend beginning with an example. You can download the Allxon Hello OTA example here.

    Explore the details of the example content on the related GitHub page.

Generate an OTA Artifact with Allxon CLI on an edge device

Step 1 – Prepare OTA Content Files

Extract the downloaded OTA example content.

Step 2 – Prepare Executable Script

1. Navigate to the ota_content folder.

2. Open the ota_deploy.bat  file with your text editor and review the example execution commands within.

💡Note: The ota_deploy.sh script is executed after the OTA artifact is delivered from Allxon Portal to your edge device. In this example, you'll see other OTA attached files being moved around folders after the artifact is deployed.

Step 3 – Generate OTA Artifact

Once the OTA files and executable script are ready, follow these instructions to pack and generate your OTA artifact.

1. Open PowerShell as administrator

2. Enter the following command to navigate to the directory:

$ cd ‘C:\Program Files\allxon-cli\bin\’

3. Input the command to create an OTA package:

$ .\allxon-cli.exe ota make -d {path of the ota_content folder}

 

Upon execution, the artifact will be generated and displayed along with a hash code for checksum examination, as well as the name of the designated folder for improved readability. For example:

[hash code]-[ota content folder name]-W-x86_64.zip

In other words, you can enhance the readability of artifact names by renaming the content folder.

💡 Important Points

1. Allxon also offers cross-platform artifact creation, such as generating aarch64 artifacts on an x86 platform for development purposes.

More details are available on our GitHub page: https://github.com/allxon/allxon-cli/blob/master/ota.md

 

2. After execution, it's crucial to verify the generated artifact on the target platform before mass deployment, as detailed in the following chapter.

Verify the Generated OTA Artifact Before Mass Deployment

It's recommended to verify the generated artifact locally before proceeding with upload and mass deployment. Allxon CLI includes an easy-to-use OTA test function for quick verification.

Step 1 – Verifying Generated Artifact

To activate the generated artifact locally, follow these steps:

  1. Open PowerShell as an administrator.

  2. Navigate to the directory:
    $ cd ‘C:\Program Files\allxon-cli\bin\’
  3. Run the following command to test the artifact:
    $ .\allxon-cli.exe ota test -f {file name of the artifact} 

💡Note: This action will simulate an OTA deployment by instructing Allxon Agent to unpack the artifact and execute the ota_deploy.bat file. This allows you to verify that the deployment operations are executed as expected, as specified in the script.

Step 2 – Check the results

In this example, an Allxon Visualizer will appear on your display.


 

Additionally, this verification function generates an execution log for the tested OTA deployment, making troubleshooting easier. You can easily locate the log file using the name of your content folder. The following picture shows what it looks like:

You're all set! With your first OTA Artifact ready, it's time to move on to the next article and discover how to deploy your OTA artifact from Allxon Portal to your fleet of devices.

 

back to top

 

Appendix: 

Allxon Hello OTA Example Content Explained

The downloaded Allxon Hello OTA folder structure below shows you where to correctly input your files and directories for packaging your first OTA artifact smoothly.

allxon-hello-ota-example-main/

  1. ota_content:  
    This directory serves as the repository for all essential files destined for deployment to your edge devices over-the-air.
  2. ota_deploy.sh:
    An executable script designated to manage all operations associated with OTA deployment. You retain full liberty to tailor the process according to your requirements by consolidating pertinent commands into this singular automation script. Our agent automatically executes this script once the artifact is downloaded and unpacked.
  3. Other files:
    These are exemplary files utilized for demonstration purposes, replaceable with your preferred content. In this instance, observe a visualizer in action along with other OTA-related files being relocated across directories. Refer to the accompanying documentation for further insights.

 

back to top

 

-----------------------------------------------------------------------------

                                                                                 Next article → 

                                            How to Deploy OTA Artifact