summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorJosh Harley <jharley@orangedogsolutions.co.uk>2022-04-20 11:05:08 +0100
committerArmin Kuster <akuster808@gmail.com>2022-05-01 10:26:52 -0700
commit8ca6bb86e653a332f7cb5b30babc0cd6c58769d0 (patch)
tree5f88d7b4a96e04ad6b20d5199a575960a66bd42e /classes
parent93f2146211001ee3cf697d8428969cc3069ed6ba (diff)
downloadmeta-security-8ca6bb86e653a332f7cb5b30babc0cd6c58769d0.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>
Diffstat (limited to 'classes')
-rw-r--r--classes/dm-verity-img.bbclass4
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
66VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity" 66VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity erofs.verity erofs-lz4.verity erofs-lz4hc.verity"
67IMAGE_TYPES += "${VERITY_TYPES}" 67IMAGE_TYPES += "${VERITY_TYPES}"
68CONVERSIONTYPES += "verity" 68CONVERSIONTYPES += "verity"
69CONVERSION_CMD:verity = "verity_setup ${type}" 69CONVERSION_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}