SWUpdate makes use of a CPIO archive with a sw-description header that contains the metadata for the update image.
This patch adds a new update-image recipe which enables creation of such image based on what the user sets IMAGE_BASENAME to. Signed-off-by: Anshul Dalal <[email protected]> --- meta-arago-distro/conf/distro/arago.conf | 2 ++ .../images/files/sw-description | 32 +++++++++++++++++++ .../recipes-swupdate/images/update-image.bb | 23 +++++++++++++ 3 files changed, 57 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 diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf index d8630718..42124577 100644 --- a/meta-arago-distro/conf/distro/arago.conf +++ b/meta-arago-distro/conf/distro/arago.conf @@ -31,6 +31,8 @@ SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_VERSION}" SDKPATHINSTALL = "/opt/${SDK_NAME}" IMAGE_FSTYPES += "tar.xz.md5sum" +IMAGE_FSTYPES:append:ti-swupdate = " ext4.gz" +IMAGE_INSTALL:append:ti-swupdate = " swupdate swupdate-www" # Extra boot files for WIC images do_image_wic[depends] += "tisdk-uenv:do_deploy" diff --git a/meta-arago-distro/recipes-swupdate/images/files/sw-description b/meta-arago-distro/recipes-swupdate/images/files/sw-description new file mode 100644 index 00000000..8dc4e2b2 --- /dev/null +++ b/meta-arago-distro/recipes-swupdate/images/files/sw-description @@ -0,0 +1,32 @@ +software = +{ + version = "0.1.0"; + + @@MACHINE@@ = { + hardware-compatibility: [ "1.0"]; + stable : { + + copy1 : { + images: ( + { + filename = "@@IMAGE_BASENAME@@-@@MACHINE@@.rootfs.ext4.gz"; + device = "/dev/mmcblk0p1"; + type = "raw"; + compressed = "zlib"; + }, + ); + }; + + copy2 : { + images: ( + { + filename = "@@IMAGE_BASENAME@@-@@MACHINE@@.rootfs.ext4.gz"; + device = "/dev/mmcblk0p2"; + type = "raw"; + compressed = "zlib"; + }, + ); + }; + }; + } +} diff --git a/meta-arago-distro/recipes-swupdate/images/update-image.bb b/meta-arago-distro/recipes-swupdate/images/update-image.bb new file mode 100644 index 00000000..33b0b74c --- /dev/null +++ b/meta-arago-distro/recipes-swupdate/images/update-image.bb @@ -0,0 +1,23 @@ +inherit swupdate + +IMAGE_BASENAME ?= "tisdk-default-image" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "\ + file://sw-description \ +" + +# images to build before building swupdate image +IMAGE_DEPENDS = "${IMAGE_BASENAME}" + +SWUPDATE_IMAGES = "${IMAGE_BASENAME}" + +SWUPDATE_IMAGES_FSTYPES[tisdk-base-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-tiny-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-default-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-bootstrap-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-jailhouse-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-thinlinux-image] = ".rootfs.ext4.gz" +SWUPDATE_IMAGES_FSTYPES[tisdk-bootstrap-base-image] = ".rootfs.ext4.gz" -- 2.52.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16848): https://lists.yoctoproject.org/g/meta-arago/message/16848 Mute This Topic: https://lists.yoctoproject.org/mt/116574473/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
