mbox series

[meta-arago,scarthgap,RFC,0/4] Add support for SWUpdate

Message ID 20251202111603.1616989-1-anshuld@ti.com
Headers show
Series Add support for SWUpdate | expand

Message

Anshul Dalal Dec. 2, 2025, 11:15 a.m. UTC
Hi all,

This RFC adds support for SWUpdate[1] to meta-arago, this provides us with OTA
updates with A/B redundancy for the rootfs.

For now the support is enabled for eMMC boot only based on the 'ti-swupdate'
override. The below steps can be used to test this RFC on an AM62x EVM:

 1. Add 'meta-swupdate' layer[2] to the SDK sources directory.

 2. Since the bootloader side changes have not been merged to ti-u-boot yet,
    make use of the 'swupdate' branch from my own U-Boot fork[3].

 3. Enable 'swupdate' support by setting the 'ti-swupdate' override in
    local.conf as follows:

      DISTROOVERRIDES:append = ":ti-swupdate"

 4. Flash the U-Boot binaries to the correct offsets on boot0 partition as
    per the docs[4] and run 'env save' on first boot to save the environment to
    eMMC's hw partition.

Regards,
Anshul

[1]: https://swupdate.org/
[2]: https://github.com/sbabic/meta-swupdate
[3]: https://github.com/ArchUsr64/u-boot/tree/swupdate
[4]: https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/latest/exports/docs/linux/How_to_Guides/Target/How_to_emmc_boot.html#how-to-emmc-boot

Anshul Dalal (4):
  swupdate: add systemd service to rootfs
  swupdate: add creation of update image
  swupdate: add bootloader support
  swupdate: enable authentication for update image

 meta-arago-distro/conf/distro/arago.conf      |  3 ++
 .../images/files/sw-description               | 46 +++++++++++++++++++
 .../recipes-swupdate/images/update-image.bb   | 27 +++++++++++
 .../libubootenv/files/fw_env.config           |  5 ++
 .../libubootenv/libubootenv_%.bbappend        | 10 ++++
 .../recipes-swupdate/swupdate/files/defconfig | 12 +++++
 .../swupdate/files/swupdate.cfg               | 13 ++++++
 .../swupdate/files/swupdate.sh                | 15 ++++++
 .../swupdate/swupdate_%.bbappend              | 35 ++++++++++++++
 .../wic/sdimage-2part-swupdate.wks            |  6 +++
 10 files changed, 172 insertions(+)
 create mode 100644 meta-arago-distro/recipes-swupdate/images/files/sw-description
 create mode 100644 meta-arago-distro/recipes-swupdate/images/update-image.bb
 create mode 100644 meta-arago-distro/recipes-swupdate/libubootenv/files/fw_env.config
 create mode 100644 meta-arago-distro/recipes-swupdate/libubootenv/libubootenv_%.bbappend
 create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/defconfig
 create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/swupdate.cfg
 create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/swupdate.sh
 create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/swupdate_%.bbappend
 create mode 100644 meta-arago-distro/wic/sdimage-2part-swupdate.wks

Comments

Denys Dmytriyenko Dec. 2, 2025, 8:59 p.m. UTC | #1
On Tue, Dec 02, 2025 at 04:45:57PM +0530, Anshul Dalal via lists.yoctoproject.org wrote:
> Hi all,
> 
> This RFC adds support for SWUpdate[1] to meta-arago, this provides us with OTA
> updates with A/B redundancy for the rootfs.
> 
> For now the support is enabled for eMMC boot only based on the 'ti-swupdate'
> override. The below steps can be used to test this RFC on an AM62x EVM:
> 
>  1. Add 'meta-swupdate' layer[2] to the SDK sources directory.
> 
>  2. Since the bootloader side changes have not been merged to ti-u-boot yet,
>     make use of the 'swupdate' branch from my own U-Boot fork[3].
> 
>  3. Enable 'swupdate' support by setting the 'ti-swupdate' override in
>     local.conf as follows:
> 
>       DISTROOVERRIDES:append = ":ti-swupdate"
> 
>  4. Flash the U-Boot binaries to the correct offsets on boot0 partition as
>     per the docs[4] and run 'env save' on first boot to save the environment to
>     eMMC's hw partition.

Why not use a more established A/B solution, such as RAUC (or even Mender)?


> Regards,
> Anshul
> 
> [1]: https://swupdate.org/
> [2]: https://github.com/sbabic/meta-swupdate
> [3]: https://github.com/ArchUsr64/u-boot/tree/swupdate
> [4]: https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/latest/exports/docs/linux/How_to_Guides/Target/How_to_emmc_boot.html#how-to-emmc-boot
> 
> Anshul Dalal (4):
>   swupdate: add systemd service to rootfs
>   swupdate: add creation of update image
>   swupdate: add bootloader support
>   swupdate: enable authentication for update image
> 
>  meta-arago-distro/conf/distro/arago.conf      |  3 ++
>  .../images/files/sw-description               | 46 +++++++++++++++++++
>  .../recipes-swupdate/images/update-image.bb   | 27 +++++++++++
>  .../libubootenv/files/fw_env.config           |  5 ++
>  .../libubootenv/libubootenv_%.bbappend        | 10 ++++
>  .../recipes-swupdate/swupdate/files/defconfig | 12 +++++
>  .../swupdate/files/swupdate.cfg               | 13 ++++++
>  .../swupdate/files/swupdate.sh                | 15 ++++++
>  .../swupdate/swupdate_%.bbappend              | 35 ++++++++++++++
>  .../wic/sdimage-2part-swupdate.wks            |  6 +++
>  10 files changed, 172 insertions(+)
>  create mode 100644 meta-arago-distro/recipes-swupdate/images/files/sw-description
>  create mode 100644 meta-arago-distro/recipes-swupdate/images/update-image.bb
>  create mode 100644 meta-arago-distro/recipes-swupdate/libubootenv/files/fw_env.config
>  create mode 100644 meta-arago-distro/recipes-swupdate/libubootenv/libubootenv_%.bbappend
>  create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/defconfig
>  create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/swupdate.cfg
>  create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/files/swupdate.sh
>  create mode 100644 meta-arago-distro/recipes-swupdate/swupdate/swupdate_%.bbappend
>  create mode 100644 meta-arago-distro/wic/sdimage-2part-swupdate.wks
> 
> -- 
> 2.52.0
Raghavendra, Vignesh Dec. 3, 2025, 2:07 p.m. UTC | #2
Hi Denys,

On 12/3/2025 2:29 AM, Denys Dmytriyenko wrote:
> On Tue, Dec 02, 2025 at 04:45:57PM +0530, Anshul Dalal via lists.yoctoproject.org wrote:
>> Hi all,
>>
>> This RFC adds support for SWUpdate[1] to meta-arago, this provides us with OTA
>> updates with A/B redundancy for the rootfs.
>>
>> For now the support is enabled for eMMC boot only based on the 'ti-swupdate'
>> override. The below steps can be used to test this RFC on an AM62x EVM:
>>
>>  1. Add 'meta-swupdate' layer[2] to the SDK sources directory.
>>
>>  2. Since the bootloader side changes have not been merged to ti-u-boot yet,
>>     make use of the 'swupdate' branch from my own U-Boot fork[3].
>>
>>  3. Enable 'swupdate' support by setting the 'ti-swupdate' override in
>>     local.conf as follows:
>>
>>       DISTROOVERRIDES:append = ":ti-swupdate"
>>
>>  4. Flash the U-Boot binaries to the correct offsets on boot0 partition as
>>     per the docs[4] and run 'env save' on first boot to save the environment to
>>     eMMC's hw partition.
> Why not use a more established A/B solution, such as RAUC (or even Mender)?
> 

SWUpdate is still the most widely requested option from users of TI K3
SoC. Its a more versatile than RAUC as it provides flexibility wrt image
level vs file vs block level updates.

AFAIK, Both RAUC and SWUpdate are equally powerfully and well
established. Could you help me understand why RAUC is more established
than SWUpdate?

AGL seems to be on OSTree. OpenWRT, CIP is SWUPdate. Buildroot supports
both (default is SWUpdate), so there isnt a common theme. Though
SWUpdate seems more common in industrial focused distro space as far as
my knowledge goes.

Mender is a different story though, its open source but has commercial
element to it. And at least K3 based beagle devices are already
supported via mender.io [1].

[1] https://hub.mender.io/t/board-support-index/5742

Regards
Vignesh