mirror of
https://git.yoctoproject.org/meta-security
synced 2026-05-07 16:59:28 +00:00
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>
This commit is contained in:
committed by
Armin Kuster
parent
93f2146211
commit
8ca6bb86e6
@@ -63,7 +63,7 @@ verity_setup() {
|
|||||||
veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity
|
veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity
|
||||||
}
|
}
|
||||||
|
|
||||||
VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity"
|
VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity erofs.verity erofs-lz4.verity erofs-lz4hc.verity"
|
||||||
IMAGE_TYPES += "${VERITY_TYPES}"
|
IMAGE_TYPES += "${VERITY_TYPES}"
|
||||||
CONVERSIONTYPES += "verity"
|
CONVERSIONTYPES += "verity"
|
||||||
CONVERSION_CMD:verity = "verity_setup ${type}"
|
CONVERSION_CMD:verity = "verity_setup ${type}"
|
||||||
@@ -90,6 +90,6 @@ python __anonymous() {
|
|||||||
# If we're using wic: we'll have to use partition images and not the rootfs
|
# If we're using wic: we'll have to use partition images and not the rootfs
|
||||||
# source plugin so add the appropriate dependency.
|
# source plugin so add the appropriate dependency.
|
||||||
if 'wic' in image_fstypes:
|
if 'wic' in image_fstypes:
|
||||||
dep = ' %s:do_image_%s' % (pn, verity_type)
|
dep = ' %s:do_image_%s' % (pn, verity_type.replace("-", "_"))
|
||||||
d.appendVarFlag('do_image_wic', 'depends', dep)
|
d.appendVarFlag('do_image_wic', 'depends', dep)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user