From ebafcffb038ac51b84024db4cf2c1e71401906a9 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Wed, 7 Aug 2024 14:23:06 +0200 Subject: [PATCH] bundle.bbclass: support manifest generation for artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful only in combination with the upcoming support for artifacts, but shouldn't hurt the standard case for now. Signed-off-by: Jan Luebbe Signed-off-by: Enrico Jörns --- classes-recipe/bundle.bbclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/classes-recipe/bundle.bbclass b/classes-recipe/bundle.bbclass index f77672a..252710a 100644 --- a/classes-recipe/bundle.bbclass +++ b/classes-recipe/bundle.bbclass @@ -40,6 +40,12 @@ # RAUC_SLOT_rootfs ?= "core-image-minimal" # RAUC_SLOT_rootfs[rename] ?= "rootfs.ext4" # +# To generate an artifact image, use / as the image name: +# RAUC_BUNDLE_SLOTS += "containers/test" +# RAUC_SLOT_containers/test ?= "container-test-image" +# RAUC_SLOT_containers/test[fstype] = "tar.gz" +# RAUC_SLOT_containers/test[convert] = "tar-extract;composefs" +# # To prepend an offset to a bootloader image, set the following parameter in bytes. # Optionally you can use units allowed by 'dd' e.g. 'K','kB','MB'. # If the offset is negative, bytes will not be added, but removed. @@ -134,7 +140,7 @@ RAUC_CASYNC_BUNDLE ??= "0" RAUC_BUNDLE_FORMAT ??= "" RAUC_BUNDLE_FORMAT[doc] = "Specifies the bundle format to be used (plain/verity)." -RAUC_VARFLAGS_SLOTS = "name type fstype file hooks adaptive rename offset depends" +RAUC_VARFLAGS_SLOTS = "name type fstype file hooks adaptive rename offset depends convert" RAUC_VARFLAGS_HOOKS = "file hooks" # Create dependency list from images @@ -291,6 +297,8 @@ def write_manifest(d): manifest.write("hooks=%s\n" % slotflags.get('hooks')) if 'adaptive' in slotflags: manifest.write("adaptive=%s\n" % slotflags.get('adaptive')) + if 'convert' in slotflags: + manifest.write("convert=%s\n" % slotflags.get('convert')) manifest.write("\n") bundle_imgpath = "%s/%s" % (bundle_path, imgname) @@ -405,7 +413,7 @@ CASYNC_BUNDLE_LINK_NAME ??= "${CASYNC_BUNDLE_BASENAME}-${MACHINE}" CASYNC_BUNDLE_EXTENSION ??= "${BUNDLE_EXTENSION}" CASYNC_BUNDLE_EXTENSION[doc] = "Specifies desired custom filename extension of generated RAUC casync bundle." -do_bundle() { +fakeroot do_bundle() { if [ -z "${RAUC_KEY_FILE}" ]; then bbfatal "'RAUC_KEY_FILE' not set. Please set to a valid key file location." fi