[v3,4/7] imagetypes: restructure files

Message ID 20220415065617.1910954-5-adriaan.schmidt@siemens.com
State Superseded, archived
Headers show
Series imagetypes | expand

Commit Message

Schmidt, Adriaan April 14, 2022, 10:56 p.m. UTC
Instead of per-type classes *-img.bbclass, we move to
- imagetypes.bbclass for the "simple" types and the conversions
- dedicated files for the more complex types:
  - imagetypes_wic.bbclass
  - imagetypes_vm.bbclass
  - imagetypes_contaier.bbclass

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/classes/cpiogz-img.bbclass               | 14 ---
 meta/classes/ext4-img.bbclass                 | 15 ----
 meta/classes/fit-img.bbclass                  | 22 -----
 meta/classes/image.bbclass                    | 50 +++++------
 meta/classes/imagetypes.bbclass               | 89 +++++++++++++++++++
 ...g.bbclass => imagetypes_container.bbclass} |  0
 .../{vm-img.bbclass => imagetypes_vm.bbclass} |  0
 ...wic-img.bbclass => imagetypes_wic.bbclass} |  0
 meta/classes/targz-img.bbclass                |  8 --
 meta/classes/ubi-img.bbclass                  | 20 -----
 meta/classes/ubifs-img.bbclass                | 19 ----
 11 files changed, 110 insertions(+), 127 deletions(-)
 delete mode 100644 meta/classes/cpiogz-img.bbclass
 delete mode 100644 meta/classes/ext4-img.bbclass
 delete mode 100644 meta/classes/fit-img.bbclass
 create mode 100644 meta/classes/imagetypes.bbclass
 rename meta/classes/{container-img.bbclass => imagetypes_container.bbclass} (100%)
 rename meta/classes/{vm-img.bbclass => imagetypes_vm.bbclass} (100%)
 rename meta/classes/{wic-img.bbclass => imagetypes_wic.bbclass} (100%)
 delete mode 100644 meta/classes/targz-img.bbclass
 delete mode 100644 meta/classes/ubi-img.bbclass
 delete mode 100644 meta/classes/ubifs-img.bbclass

Comments

MOESSBAUER, Felix April 20, 2022, 9:03 a.m. UTC | #1
> +
> +# image type: ubi
> +IMAGER_INSTALL_ubi += "mtd-utils"
> +IMAGE_CMD_REQUIRED_ARGS_ubi = "UBINIZE_ARGS"
> +UBINIZE_CFG ??= "ubinize.cfg"
> +
> +IMAGE_CMD_ubi() {
> +    if [ ! -e "${WORKDIR}/${UBINIZE_CFG}" ]; then
> +        die "UBINIZE_CFG does not contain ubinize config file."
> +    fi
> +
> +    ${SUDO_CHROOT} /usr/sbin/ubinize ${UBINIZE_ARGS} \
> +                -o '${IMAGE_FILE_CHROOT}' '${PP_WORK}/${UBINIZE_CFG}'
> +}
> +IMAGE_CMD_ubi[depends] = "${PN}:do_transform_template"
> +
> +# image conversions
> +IMAGE_CONVERSIONS = "gz xz"
> +
> +CONVERSION_CMD_gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable
> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'"
> +CONVERSION_DEPS_gz = "gzip"
> +
> +XZ_OPTIONS ?= ""
> +CONVERSION_CMD_xz = "${SUDO_CHROOT} sh -c 'cat
> ${IMAGE_FILE_CHROOT} | xz ${XZ_OPTIONS} > ${IMAGE_FILE_CHROOT}.xz'"

This breaks parallel compression as the pipe feeds in data in small chunks.
Writing this as following gives a super linear speedup and even better compression ratios (for large images).
But without limiting memory, we might easily get OOMs.
Please also note, that xz using default settings does not compress in parallel (at least the version on Debian bullseye).

XZ_OPTIONS ?= "-T0"
CONVERSION_CMD_xz = "${SUDO_CHROOT} sh -c 'xz -k -c ${XZ_OPTIONS} ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.xz'"

Felix

> +CONVERSION_DEPS_xz = "xz-utils"
> diff --git a/meta/classes/container-img.bbclass
> b/meta/classes/imagetypes_container.bbclass
> similarity index 100%
> rename from meta/classes/container-img.bbclass
> rename to meta/classes/imagetypes_container.bbclass
> diff --git a/meta/classes/vm-img.bbclass
> b/meta/classes/imagetypes_vm.bbclass
> similarity index 100%
> rename from meta/classes/vm-img.bbclass
> rename to meta/classes/imagetypes_vm.bbclass
> diff --git a/meta/classes/wic-img.bbclass
> b/meta/classes/imagetypes_wic.bbclass
> similarity index 100%
> rename from meta/classes/wic-img.bbclass rename to
> meta/classes/imagetypes_wic.bbclass
> diff --git a/meta/classes/targz-img.bbclass b/meta/classes/targz-img.bbclass
> deleted file mode 100644 index 74d34e29..00000000
> --- a/meta/classes/targz-img.bbclass
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -# This software is a part of ISAR.
> -# Copyright (c) Siemens AG, 2018
> -#
> -# SPDX-License-Identifier: MIT
> -
> -IMAGE_CMD_tar() {
> -    sudo tar -cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.tar.gz --one-
> file-system -C ${IMAGE_ROOTFS} .
> -}
> diff --git a/meta/classes/ubi-img.bbclass b/meta/classes/ubi-img.bbclass
> deleted file mode 100644 index 92acb6f8..00000000
> --- a/meta/classes/ubi-img.bbclass
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -# This software is a part of ISAR.
> -# Copyright (C) Siemens AG, 2019
> -#
> -# SPDX-License-Identifier: MIT
> -
> -UBINIZE_CFG ??= "ubinize.cfg"
> -
> -IMAGER_INSTALL_ubi += "mtd-utils"
> -
> -# Generate ubi filesystem image
> -IMAGE_CMD_ubi() {
> -    if [ ! -e "${WORKDIR}/${UBINIZE_CFG}" ]; then
> -        die "UBINIZE_CFG does not contain ubinize config file."
> -    fi
> -
> -    ${SUDO_CHROOT} /usr/sbin/ubinize ${UBINIZE_ARGS} \
> -                -o '${IMAGE_FILE_CHROOT}' '${PP_WORK}/${UBINIZE_CFG}'
> -}
> -IMAGE_CMD_ubi[depends] = "${PN}:do_transform_template"
> -IMAGE_CMD_REQUIRED_ARGS_ubi = "UBINIZE_ARGS"
> diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
> deleted file mode 100644 index 5f1be89e..00000000
> --- a/meta/classes/ubifs-img.bbclass
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -# This software is a part of ISAR.
> -# Copyright (C) Siemens AG, 2019
> -#
> -# SPDX-License-Identifier: MIT
> -
> -IMAGER_INSTALL_ubifs += "mtd-utils"
> -
> -# glibc bug 23960
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourcew
> are.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D23960&amp;data=04%7C01%7Cf
> elix.moessbauer%40siemens.com%7Ccae347b95ae94fabeac708da1ead1846%7
> C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637856026794071339%
> 7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi
> I6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=EpBCpH7vBfCKj%2B5MTYc
> ORJKdupyPLu9HK%2F1uT93fHTc%3D&amp;reserved=0
> -# should not use QEMU on armhf target with mkfs.ubifs < v2.1.3 -
> THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
> -ISAR_CROSS_COMPILE_armhf = "${@bb.utils.contains('IMAGE_BASETYPES',
> 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
> -
> -# Generate ubifs filesystem image
> -IMAGE_CMD_ubifs() {
> -    # Create ubifs image using buildchroot tools
> -    ${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
> -                -r '${PP_ROOTFS}' '${IMAGE_FILE_CHROOT}'
> -}
> -IMAGE_CMD_REQUIRED_ARGS_ubifs = "MKUBIFS_ARGS"
> --
> 2.30.2
> 
> --
> You received this message because you are subscribed to the Google Groups
> "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to isar-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.g
> oogle.com%2Fd%2Fmsgid%2Fisar-users%2F20220415065617.1910954-5-
> adriaan.schmidt%2540siemens.com&amp;data=04%7C01%7Cfelix.moessbauer
> %40siemens.com%7Ccae347b95ae94fabeac708da1ead1846%7C38ae3bcd9579
> 4fd4addab42e1495d55a%7C1%7C0%7C637856026794071339%7CUnknown%7C
> TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> VCI6Mn0%3D%7C2000&amp;sdata=1MTK5T8Hp5RbSFPMtoEFDB2jHNmUgm7jR
> SWj3JdeUlE%3D&amp;reserved=0.

Patch

diff --git a/meta/classes/cpiogz-img.bbclass b/meta/classes/cpiogz-img.bbclass
deleted file mode 100644
index f4c33bd9..00000000
--- a/meta/classes/cpiogz-img.bbclass
+++ /dev/null
@@ -1,14 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (C) 2020 Siemens AG
-#
-# SPDX-License-Identifier: MIT
-
-IMAGER_INSTALL_cpio += "cpio"
-CPIO_IMAGE_FORMAT ?= "newc"
-
-IMAGE_CMD_cpio() {
-    ${SUDO_CHROOT} \
-        sh -c "cd ${PP_ROOTFS}; /usr/bin/find . | \
-               /usr/bin/cpio -H ${CPIO_IMAGE_FORMAT} -o > \
-               ${IMAGE_FILE_CHROOT}"
-}
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
deleted file mode 100644
index 73d1bb57..00000000
--- a/meta/classes/ext4-img.bbclass
+++ /dev/null
@@ -1,15 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (C) 2015-2017 ilbers GmbH
-
-IMAGER_INSTALL_ext4 += "e2fsprogs"
-
-MKE2FS_ARGS ?=  "-t ext4"
-
-# Generate ext4 filesystem image
-IMAGE_CMD_ext4() {
-    truncate -s ${ROOTFS_SIZE}K '${IMAGE_FILE_HOST}'
-
-    ${SUDO_CHROOT} /sbin/mke2fs ${MKE2FS_ARGS} \
-                -F -d '${PP_ROOTFS}' '${IMAGE_FILE_CHROOT}'
-}
-#IMAGE_CMD_ext4[vardepsexclude] = "ROOTFS_SIZE ROOTFS_EXTRA"
diff --git a/meta/classes/fit-img.bbclass b/meta/classes/fit-img.bbclass
deleted file mode 100644
index ef65af88..00000000
--- a/meta/classes/fit-img.bbclass
+++ /dev/null
@@ -1,22 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-MKIMAGE_ARGS ??= ""
-
-FIT_IMAGE_SOURCE ??= "fitimage.its"
-
-IMAGER_INSTALL_fit += "u-boot-tools device-tree-compiler"
-
-# Generate fit image
-IMAGE_CMD_fit() {
-    if [ ! -e "${WORKDIR}/${FIT_IMAGE_SOURCE}" ]; then
-        die "FIT_IMAGE_SOURCE does not contain fitimage source file"
-    fi
-
-    # Create fit image using buildchroot tools
-    ${SUDO_CHROOT} /usr/bin/mkimage ${MKIMAGE_ARGS} \
-                -f '${PP_WORK}/${FIT_IMAGE_SOURCE}' '${IMAGE_FILE_CHROOT}'
-}
-IMAGE_CMD_fit[depends] = "${PN}:do_transform_template"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index fa24a5e8..26b1b0df 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -11,7 +11,6 @@  SSTATE_MANIFESTS = "${TMPDIR}/sstate-control/${MACHINE}-${DISTRO}-${DISTRO_ARCH}
 
 IMAGE_INSTALL ?= ""
 IMAGE_FSTYPES ?= "${@ d.getVar("IMAGE_TYPE", True) if d.getVar("IMAGE_TYPE", True) else "ext4"}"
-IMAGE_CONVERSIONS = "gz xz"
 IMAGE_ROOTFS ?= "${WORKDIR}/rootfs"
 
 KERNEL_IMAGE_PKG ??= "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getVar("KERNEL_NAME", True) else ""}"
@@ -85,6 +84,26 @@  inherit image-postproc-extension
 inherit image-locales-extension
 inherit image-account-extension
 
+# Extra space for rootfs in MB
+ROOTFS_EXTRA ?= "64"
+
+def get_rootfs_size(d):
+    import subprocess
+    rootfs_extra = int(d.getVar("ROOTFS_EXTRA", True))
+
+    output = subprocess.check_output(
+        ["sudo", "du", "-xs", "--block-size=1k", d.getVar("IMAGE_ROOTFS", True)]
+    )
+    base_size = int(output.split()[0])
+
+    return base_size + rootfs_extra * 1024
+
+python set_image_size () {
+    rootfs_size = get_rootfs_size(d)
+    d.setVar('ROOTFS_SIZE', str(rootfs_size))
+    d.setVarFlag('ROOTFS_SIZE', 'export', '1')
+}
+
 def get_base_type(t, d):
     bt = t
     for c in d.getVar('IMAGE_CONVERSIONS').split():
@@ -120,18 +139,10 @@  IMAGE_BASETYPES = "${@get_image_basetypes(d)}"
 
 # image types
 IMAGE_CLASSES ??= ""
-IMGCLASSES = "container-img cpiogz-img ext4-img fit-img targz-img ubi-img ubifs-img vm-img wic-img"
+IMGCLASSES = "imagetypes imagetypes_wic imagetypes_vm imagetypes_container"
 IMGCLASSES += "${IMAGE_CLASSES}"
 inherit ${IMGCLASSES}
 
-# image conversions
-CONVERSION_CMD_gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'"
-CONVERSION_DEPS_gz = "gzip"
-
-XZ_OPTIONS ?= ""
-CONVERSION_CMD_xz = "${SUDO_CHROOT} sh -c 'cat ${IMAGE_FILE_CHROOT} | xz ${XZ_OPTIONS} > ${IMAGE_FILE_CHROOT}.xz'"
-CONVERSION_DEPS_xz = "xz-utils"
-
 # hook up IMAGE_CMD_*
 python() {
     image_types = (d.getVar('IMAGE_FSTYPES') or '').split()
@@ -272,19 +283,6 @@  python() {
     d.appendVar('IMAGER_BUILD_DEPS', ' ' + ' '.join(sorted(imager_build_deps)))
 }
 
-# Extra space for rootfs in MB
-ROOTFS_EXTRA ?= "64"
-
-def get_rootfs_size(d):
-    import subprocess
-    rootfs_extra = int(d.getVar("ROOTFS_EXTRA", True))
-
-    output = subprocess.check_output(
-        ["sudo", "du", "-xs", "--block-size=1k", d.getVar("IMAGE_ROOTFS", True)]
-    )
-    base_size = int(output.split()[0])
-
-    return base_size + rootfs_extra * 1024
 
 # here we call a command that should describe your whole build system,
 # this could be "git describe" or something similar.
@@ -303,12 +301,6 @@  get_build_id() {
 	fi
 }
 
-python set_image_size () {
-    rootfs_size = get_rootfs_size(d)
-    d.setVar('ROOTFS_SIZE', str(rootfs_size))
-    d.setVarFlag('ROOTFS_SIZE', 'export', '1')
-}
-
 ROOTFS_CONFIGURE_COMMAND += "image_configure_fstab"
 image_configure_fstab[weight] = "2"
 image_configure_fstab() {
diff --git a/meta/classes/imagetypes.bbclass b/meta/classes/imagetypes.bbclass
new file mode 100644
index 00000000..5f9b5df3
--- /dev/null
+++ b/meta/classes/imagetypes.bbclass
@@ -0,0 +1,89 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2021 Siemens AG
+#
+# SPDX-License-Identifier: MIT
+
+#image type: tar
+IMAGER_INSTALL_tar = "tar"
+TAR_OPTIIONS ?= ""
+
+IMAGE_CMD_tar() {
+    ${SUDO_CHROOT} tar ${TAR_OPTIONS} -cvzf \
+                 ${IMAGE_FILE_CHROOT} --one-file-system -C ${PP_ROOTFS} .
+}
+
+# image type: ext4
+IMAGER_INSTALL_ext4 += "e2fsprogs"
+MKE2FS_ARGS ?=  "-t ext4"
+
+IMAGE_CMD_ext4() {
+    truncate -s ${ROOTFS_SIZE}K '${IMAGE_FILE_HOST}'
+
+    ${SUDO_CHROOT} /sbin/mke2fs ${MKE2FS_ARGS} \
+                -F -d '${PP_ROOTFS}' '${IMAGE_FILE_CHROOT}'
+}
+
+# image type: cpio
+IMAGER_INSTALL_cpio += "cpio"
+CPIO_IMAGE_FORMAT ?= "newc"
+
+IMAGE_CMD_cpio() {
+    ${SUDO_CHROOT} \
+        sh -c "cd ${PP_ROOTFS}; /usr/bin/find . | \
+               /usr/bin/cpio -H ${CPIO_IMAGE_FORMAT} -o > \
+               ${IMAGE_FILE_CHROOT}"
+}
+
+# image type: fit
+MKIMAGE_ARGS ??= ""
+FIT_IMAGE_SOURCE ??= "fitimage.its"
+IMAGER_INSTALL_fit += "u-boot-tools device-tree-compiler"
+
+IMAGE_CMD_fit() {
+    if [ ! -e "${WORKDIR}/${FIT_IMAGE_SOURCE}" ]; then
+        die "FIT_IMAGE_SOURCE does not contain fitimage source file"
+    fi
+
+    ${SUDO_CHROOT} /usr/bin/mkimage ${MKIMAGE_ARGS} \
+                -f '${PP_WORK}/${FIT_IMAGE_SOURCE}' '${IMAGE_FILE_CHROOT}'
+}
+IMAGE_CMD_fit[depends] = "${PN}:do_transform_template"
+
+# image type: ubifs
+IMAGER_INSTALL_ubifs += "mtd-utils"
+IMAGE_CMD_REQUIRED_ARGS_ubifs = "MKUBIFS_ARGS"
+
+# glibc bug 23960 https://sourceware.org/bugzilla/show_bug.cgi?id=23960
+# should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
+THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
+ISAR_CROSS_COMPILE_armhf = "${@bb.utils.contains('IMAGE_BASETYPES', 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
+
+IMAGE_CMD_ubifs() {
+    ${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
+                -r '${PP_ROOTFS}' '${IMAGE_FILE_CHROOT}'
+}
+
+# image type: ubi
+IMAGER_INSTALL_ubi += "mtd-utils"
+IMAGE_CMD_REQUIRED_ARGS_ubi = "UBINIZE_ARGS"
+UBINIZE_CFG ??= "ubinize.cfg"
+
+IMAGE_CMD_ubi() {
+    if [ ! -e "${WORKDIR}/${UBINIZE_CFG}" ]; then
+        die "UBINIZE_CFG does not contain ubinize config file."
+    fi
+
+    ${SUDO_CHROOT} /usr/sbin/ubinize ${UBINIZE_ARGS} \
+                -o '${IMAGE_FILE_CHROOT}' '${PP_WORK}/${UBINIZE_CFG}'
+}
+IMAGE_CMD_ubi[depends] = "${PN}:do_transform_template"
+
+# image conversions
+IMAGE_CONVERSIONS = "gz xz"
+
+CONVERSION_CMD_gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'"
+CONVERSION_DEPS_gz = "gzip"
+
+XZ_OPTIONS ?= ""
+CONVERSION_CMD_xz = "${SUDO_CHROOT} sh -c 'cat ${IMAGE_FILE_CHROOT} | xz ${XZ_OPTIONS} > ${IMAGE_FILE_CHROOT}.xz'"
+CONVERSION_DEPS_xz = "xz-utils"
diff --git a/meta/classes/container-img.bbclass b/meta/classes/imagetypes_container.bbclass
similarity index 100%
rename from meta/classes/container-img.bbclass
rename to meta/classes/imagetypes_container.bbclass
diff --git a/meta/classes/vm-img.bbclass b/meta/classes/imagetypes_vm.bbclass
similarity index 100%
rename from meta/classes/vm-img.bbclass
rename to meta/classes/imagetypes_vm.bbclass
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/imagetypes_wic.bbclass
similarity index 100%
rename from meta/classes/wic-img.bbclass
rename to meta/classes/imagetypes_wic.bbclass
diff --git a/meta/classes/targz-img.bbclass b/meta/classes/targz-img.bbclass
deleted file mode 100644
index 74d34e29..00000000
--- a/meta/classes/targz-img.bbclass
+++ /dev/null
@@ -1,8 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2018
-#
-# SPDX-License-Identifier: MIT
-
-IMAGE_CMD_tar() {
-    sudo tar -cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.tar.gz --one-file-system -C ${IMAGE_ROOTFS} .
-}
diff --git a/meta/classes/ubi-img.bbclass b/meta/classes/ubi-img.bbclass
deleted file mode 100644
index 92acb6f8..00000000
--- a/meta/classes/ubi-img.bbclass
+++ /dev/null
@@ -1,20 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-UBINIZE_CFG ??= "ubinize.cfg"
-
-IMAGER_INSTALL_ubi += "mtd-utils"
-
-# Generate ubi filesystem image
-IMAGE_CMD_ubi() {
-    if [ ! -e "${WORKDIR}/${UBINIZE_CFG}" ]; then
-        die "UBINIZE_CFG does not contain ubinize config file."
-    fi
-
-    ${SUDO_CHROOT} /usr/sbin/ubinize ${UBINIZE_ARGS} \
-                -o '${IMAGE_FILE_CHROOT}' '${PP_WORK}/${UBINIZE_CFG}'
-}
-IMAGE_CMD_ubi[depends] = "${PN}:do_transform_template"
-IMAGE_CMD_REQUIRED_ARGS_ubi = "UBINIZE_ARGS"
diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
deleted file mode 100644
index 5f1be89e..00000000
--- a/meta/classes/ubifs-img.bbclass
+++ /dev/null
@@ -1,19 +0,0 @@ 
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-IMAGER_INSTALL_ubifs += "mtd-utils"
-
-# glibc bug 23960 https://sourceware.org/bugzilla/show_bug.cgi?id=23960
-# should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
-THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
-ISAR_CROSS_COMPILE_armhf = "${@bb.utils.contains('IMAGE_BASETYPES', 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
-
-# Generate ubifs filesystem image
-IMAGE_CMD_ubifs() {
-    # Create ubifs image using buildchroot tools
-    ${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
-                -r '${PP_ROOTFS}' '${IMAGE_FILE_CHROOT}'
-}
-IMAGE_CMD_REQUIRED_ARGS_ubifs = "MKUBIFS_ARGS"