diff options
author | Josh Harley <jharley@orangedogsolutions.co.uk> | 2023-02-14 09:08:30 +0100 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-06-08 13:26:03 -0400 |
commit | d13f680eb8d975159dca4c733b4eebee3f2b4278 (patch) | |
tree | 3ab406999c693898dbfceb7edfecf3e476f0bdd4 | |
parent | ef7d781f97f8e49e00291b2c28ffca25b7f498b8 (diff) | |
download | meta-security-d13f680eb8d975159dca4c733b4eebee3f2b4278.tar.gz |
Add EROFS support to dm-verity-img class
[PATCH] Add support for the EROFS image, and it's compressed options,
to the dm-verity-img.bbclass setup, theoretically this is a simple addition
to the list of types however there is a quirk in how Poky handles the
filesystems in poky/meta/classes/image_types.bbclass.
Specifically the 'IMAGE_CMD' and 'IMAGE_FSTYPES' use a hyphen, e.g.
erofs-lz4, however in the image_type bbclass the task for that would be
"do_image_erofs_lz4", replacing the hyphen with an underscore.
As the dm-verity-img.bbclass adds a dependency to the wic image creation
on the do_image_* task then it fails as there is no
"do_image_erofs-lz4", so simply replace the hypen with an underscore.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 8ca6bb86e653a332f7cb5b30babc0cd6c58769d0)
Signed-off-by: Maciek Borzecki <maciek@thing.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | classes/dm-verity-img.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass index 93f667d..dd447e6 100644 --- a/classes/dm-verity-img.bbclass +++ b/classes/dm-verity-img.bbclass | |||
@@ -63,7 +63,7 @@ verity_setup() { | |||
63 | veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity | 63 | veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity |
64 | } | 64 | } |
65 | 65 | ||
66 | VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity" | 66 | VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity erofs.verity erofs-lz4.verity erofs-lz4hc.verity" |
67 | IMAGE_TYPES += "${VERITY_TYPES}" | 67 | IMAGE_TYPES += "${VERITY_TYPES}" |
68 | CONVERSIONTYPES += "verity" | 68 | CONVERSIONTYPES += "verity" |
69 | CONVERSION_CMD:verity = "verity_setup ${type}" | 69 | CONVERSION_CMD:verity = "verity_setup ${type}" |
@@ -90,6 +90,6 @@ python __anonymous() { | |||
90 | # If we're using wic: we'll have to use partition images and not the rootfs | 90 | # If we're using wic: we'll have to use partition images and not the rootfs |
91 | # source plugin so add the appropriate dependency. | 91 | # source plugin so add the appropriate dependency. |
92 | if 'wic' in image_fstypes: | 92 | if 'wic' in image_fstypes: |
93 | dep = ' %s:do_image_%s' % (pn, verity_type) | 93 | dep = ' %s:do_image_%s' % (pn, verity_type.replace("-", "_")) |
94 | d.appendVarFlag('do_image_wic', 'depends', dep) | 94 | d.appendVarFlag('do_image_wic', 'depends', dep) |
95 | } | 95 | } |