Trucrux Inc

SWUpdate Guide

SWUpdate is a Linux Update agent with the goal to provide an efficient and safe way to update an embedded system.
SWUpdate supports local and remote updates, multiple update strategies and it can be well integrated in the Yocto build system by adding the meta-swupdate layer.

Creating SWUpdate ready Image #

To use the SWUpdate follow the Building Yocto OS from source code guide and create fsl-image-gui.

Once the fsl-image-gui is created you to created a swupdate image. To create a swupdate image run the following command.

$ bitbake trux-image-swupdate

Once image is done, it has to be flashed in SoM’s eMMC. To do so first flash the image in SD card then flash SD card image into eMMC.

Flashing image in to SD Card.

$ cd ~/CodeSetup/build_xwayland
$ sudo MACHINE=imx8mq-trux-q01 ../sources/meta-trucrux/scripts/trux_mk_yocto_sdcard/trux-create-yocto-sdcard.sh -r tmp/deploy/images/imx8mq-trux-q01/trux-image-swupdate-imx8mq-trux-q01 /dev/sdX

Generate a Field Update file (.swu image) #

 

To generate a swu file run the below command

$ bitbake trux-image-swu

Updating with SWU file #

Boot the device and run ifconfig and get the ip address. Now open the web browser and type the ip following with “:8080”

Example for ip ‘192.168.0.120’ type ‘192.168.0.120:8080’

Now select the swu file

Default path should be

~/Codesetup/build_xwayland/tmp/deploy/images/imx8mq-trux-q01/trux-image-swu-imx8mq-trux-q01.swu

Selecting file automatically starts update. This is how it looks when update is done.