Depending upon your firmware update strategy, you can create a software update (SWU) package in different ways. To learn about the characteristics of SWU packages based on binary differences, see SWU packages based on differences.

To build a SWU package based on binary differences, you need to provide the rootfs partition squashfs base image from which to calculate the differences with respect to the new generated rootfs image. The binary delta file is then automatically generated by the DEY build system. During the update process, the contents of the active rootfs partition are read as the base and written to the inactive rootfs partition, applying the delta binary patch on-the-fly. The boot partition will still be updated but as a full image.

To enable this update type, you must specify the base source file in the project configuration file defining the variable SWUPDATE_RDIFF_ROOTFS_SOURCE_FILE, for example:

SWUPDATE_RDIFF_ROOTFS_SOURCE_FILE = "/home/<user>/old_rootfs.squashfs"

Once the rootfs squashfs base file is set, use the following command from your project’s directory to build the SWU package:

$ bitbake core-image-base-swu

This generates the update package under <project_folder>/tmp/deploy/images/ccmp13-dvk:

If the SWUPDATE_RDIFF_ROOTFS_SOURCE_FILE variable is configured in the project but any SWUPDATE_FILES_LIST or SWUPDATE_FILES_TARGZ_FILE variables are also set, the build system prioritizes a SWU update package based on files instead of a binary diff.

Refer to Include bootloader in SWU packages to learn how to include U-Boot in the SWU package.

Refer to Customize SWU package installation to learn how to customize the SWU package installation process.

Refer to Program an SWU package to learn how to program SWU packages.