Skip to content

Commit

Permalink
bundle.bbclass: support manifest generation for artifacts
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Enrico Jörns <[email protected]>
  • Loading branch information
jluebbe authored and ejoerns committed Nov 15, 2024
1 parent 4b71b6f commit ebafcff
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions classes-recipe/bundle.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
# RAUC_SLOT_rootfs ?= "core-image-minimal"
# RAUC_SLOT_rootfs[rename] ?= "rootfs.ext4"
#
# To generate an artifact image, use <repo>/<artifact> 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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ebafcff

Please sign in to comment.