Skip to content

About firmware OTA using AWS Greengrass

0

Hello, I am considering using AWS IoT Greengrass on a Yocto Linux based core device. However, I am struggling to find information on how to perform a firmware OTA in such system. My understanding that OTA update of application code is natively supported by Greengrass but what about the firmware aspect? Do I need to prepare custom component that will handle the firmware update?

Thank you! Alex

asked a year ago453 views
2 Answers
2

Hello Alex,

AWS IoT Greengrass does indeed support over-the-air (OTA) updates, but it's important to understand the scope of these updates and how they apply to your specific use case with a Yocto Linux based core device.

The AWS IoT Greengrass Core software natively supports OTA updates for its own components, including the Greengrass nucleus and other optional components that you deploy to your devices. These updates are designed to fix security vulnerabilities, address software stability issues, and deploy new or improved features of the Greengrass software itself.

However, when it comes to firmware updates for your specific Yocto Linux based system, Greengrass doesn't provide a built-in solution out of the box. The OTA update mechanism provided by Greengrass is primarily focused on updating the Greengrass software and components running on top of your operating system, not the underlying firmware or operating system itself.

To perform firmware OTA updates for your Yocto Linux based core device, you would indeed need to create a custom component that handles this specific task. This custom component would need to:

  1. Receive the firmware update package
  2. Verify the integrity and authenticity of the update
  3. Apply the update to the appropriate partition or system area
  4. Handle any necessary reboots or system reconfiguration

You can leverage Greengrass's deployment and component management capabilities to distribute and manage this custom firmware update component across your devices. Your custom component could use Greengrass features like local resource access to interact with the device's firmware, and you could use Greengrass's built-in security features to ensure secure delivery of the firmware updates.

It's worth noting that firmware updates can be critical operations with potential risks, so ensure your custom component includes proper error handling, rollback mechanisms, and thorough testing before deployment.

In summary, while Greengrass provides OTA capabilities for its own software, for firmware updates of your Yocto Linux based system, you'll need to develop a custom solution leveraging Greengrass's component framework and deployment capabilities.

Sources
Update the AWS IoT Greengrass Core software (OTA) - AWS IoT Greengrass
OTA updates of AWS IoT Greengrass Core software - AWS IoT Greengrass
AWS IoT Greengrass Features - Amazon Web Services

answered a year ago
EXPERT
reviewed a year ago
1
Accepted Answer

Hi Alex. The Agent's answer is waffly, but accurate. You'll need a custom component that integrates with your update tool and your partitioning. One thing it fails to mention is you should likely use the Bootstrap lifecycle in your recipe, as this is purpose built to integrate Greengrass deployments with OS updates. The Bootstrap lifecycle also supports rollback.

For instance, if you used swupdate as your update tool in your distro, a very simplified example of your recipe would be something like this:

  ComponentVersion: 1.0.0
  ComponentDescription: ImageUpdater
  ComponentPublisher: Any Company
  Manifests:
  - Platform:
      os: linux
    Lifecycle:
      Bootstrap:
        Script: |-
          swupdate -i {artifacts:Path}/os-image.swu
          exit 101 # Reboot to start the new image running
    Artifacts:
    # Let the Greengrass deployment download your image file as an artifact.
    - Uri: s3://BUCKET_NAME/ImageUpdater/1.0.0/os-image.swu

You should very likely use the new Nucleus lite: https://aws.amazon.com/about-aws/whats-new/2024/12/aws-iot-greengrass-v2-14-lightweight-edge-runtime-software/

And there's a brand new A/B update example using RAUC:

https://github.com/aws4embeddedlinux/meta-aws-demos/releases/tag/2024.12.16

https://github.com/aws4embeddedlinux/meta-aws-demos/blob/2024.12.16/meta-aws-demos/recipes-core/images/aws-iot-greengrass-lite-demo-image/README.md#demo-ab-update-greengrass-component

AWS
EXPERT
answered a year ago
EXPERT
reviewed a year ago
  • Hello Greg, Thank you for clarifying the Agent answer and sharing extra suggestions. That was very helpful!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.