diff options
| -rw-r--r-- | meta/classes-recipe/image_types.bbclass | 15 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index fdee835e7c..4aed64e27f 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass | |||
| @@ -131,6 +131,15 @@ IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.er | |||
| 131 | IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}" | 131 | IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}" |
| 132 | IMAGE_CMD:erofs-lz4hc = "mkfs.erofs -zlz4hc ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4hc ${IMAGE_ROOTFS}" | 132 | IMAGE_CMD:erofs-lz4hc = "mkfs.erofs -zlz4hc ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4hc ${IMAGE_ROOTFS}" |
| 133 | 133 | ||
| 134 | # Note that vfat can't handle all types of files that a real linux file system | ||
| 135 | # can (e.g. device files, symlinks, etc.) and therefore it not suitable for all | ||
| 136 | # use cases | ||
| 137 | oe_mkvfatfs () { | ||
| 138 | mkfs.vfat $@ -C ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.vfat ${ROOTFS_SIZE} | ||
| 139 | mcopy -i "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.vfat" -vsmpQ ${IMAGE_ROOTFS}/* ::/ | ||
| 140 | } | ||
| 141 | |||
| 142 | IMAGE_CMD:vfat = "oe_mkvfatfs ${EXTRA_IMAGECMD}" | ||
| 134 | 143 | ||
| 135 | IMAGE_CMD_TAR ?= "tar" | 144 | IMAGE_CMD_TAR ?= "tar" |
| 136 | # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs | 145 | # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs |
| @@ -266,6 +275,10 @@ EXTRA_IMAGECMD:ext4 ?= "-i 4096" | |||
| 266 | EXTRA_IMAGECMD:btrfs ?= "-n 4096 --shrink" | 275 | EXTRA_IMAGECMD:btrfs ?= "-n 4096 --shrink" |
| 267 | EXTRA_IMAGECMD:f2fs ?= "" | 276 | EXTRA_IMAGECMD:f2fs ?= "" |
| 268 | 277 | ||
| 278 | # If a specific FAT size is needed, set it here (e.g. "-F 32"/"-F 16"/"-F 12") | ||
| 279 | # otherwise mkfs.vfat will automatically pick one. | ||
| 280 | EXTRA_IMAGECMD:vfat ?= "" | ||
| 281 | |||
| 269 | do_image_cpio[depends] += "cpio-native:do_populate_sysroot" | 282 | do_image_cpio[depends] += "cpio-native:do_populate_sysroot" |
| 270 | do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot" | 283 | do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot" |
| 271 | do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot" | 284 | do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot" |
| @@ -285,6 +298,7 @@ do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot" | |||
| 285 | do_image_erofs[depends] += "erofs-utils-native:do_populate_sysroot" | 298 | do_image_erofs[depends] += "erofs-utils-native:do_populate_sysroot" |
| 286 | do_image_erofs_lz4[depends] += "erofs-utils-native:do_populate_sysroot" | 299 | do_image_erofs_lz4[depends] += "erofs-utils-native:do_populate_sysroot" |
| 287 | do_image_erofs_lz4hc[depends] += "erofs-utils-native:do_populate_sysroot" | 300 | do_image_erofs_lz4hc[depends] += "erofs-utils-native:do_populate_sysroot" |
| 301 | do_image_vfat[depends] += "dosfstools-native:do_populate_sysroot mtools-native:do_populate_sysroot" | ||
| 288 | 302 | ||
| 289 | # This variable is available to request which values are suitable for IMAGE_FSTYPES | 303 | # This variable is available to request which values are suitable for IMAGE_FSTYPES |
| 290 | IMAGE_TYPES = " \ | 304 | IMAGE_TYPES = " \ |
| @@ -294,6 +308,7 @@ IMAGE_TYPES = " \ | |||
| 294 | ext3 ext3.gz \ | 308 | ext3 ext3.gz \ |
| 295 | ext4 ext4.gz \ | 309 | ext4 ext4.gz \ |
| 296 | btrfs \ | 310 | btrfs \ |
| 311 | vfat \ | ||
| 297 | squashfs squashfs-xz squashfs-lzo squashfs-lz4 squashfs-zst \ | 312 | squashfs squashfs-xz squashfs-lzo squashfs-lz4 squashfs-zst \ |
| 298 | ubi ubifs multiubi \ | 313 | ubi ubifs multiubi \ |
| 299 | tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \ | 314 | tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \ |
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index a5e069d0be..dc88c222bd 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
| @@ -199,7 +199,7 @@ class ImageFeatures(OESelftestTestCase): | |||
| 199 | image = 'core-image-minimal' | 199 | image = 'core-image-minimal' |
| 200 | 200 | ||
| 201 | all_image_types = set(get_bb_var("IMAGE_TYPES", image).split()) | 201 | all_image_types = set(get_bb_var("IMAGE_TYPES", image).split()) |
| 202 | skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo')) | 202 | skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo', 'vfat')) |
| 203 | img_types = all_image_types - skip_image_types | 203 | img_types = all_image_types - skip_image_types |
| 204 | 204 | ||
| 205 | config = """ | 205 | config = """ |
