Hi Henning, One use-case on our side is the generation of SWUpdate image. Our helper class uses do_ext4_image to generate the file-system image we later embed into the .swu file Hope that helps Cedric On Tuesday, February 19, 2019 at 10:25:58 AM UTC+1, Henning Schild wrote: > > Hi, > > did you do some research on ext4-usage, we might be able to just drop > it and use wic instead. The qemus will have to switch from i.e. > root=/dev/sda to /dev/sda1 ... sounds easy enough. As far as i can tell > they are the only users in Isar. And outside a raw ext4 partition does > not seem to be too useful either, we could always keep it as > "deprecated" if we are afraid of that move. > > Henning > > On Mon, 18 Feb 2019 14:04:29 +0100 > "[ext] claudius....@siemens.com " > > wrote: > > > From: Claudius Heine > > > > > EXT4_IMAGE_FILE does no longer contain the full path to the ext4 image > > in the deploy directory. > > > > Signed-off-by: Claudius Heine > > > --- > > meta-isar/classes/rpi-sdimg.bbclass | 2 +- > > meta/classes/ext4-img.bbclass | 31 > > +++++++++++------------------ 2 files changed, 13 insertions(+), 20 > > deletions(-) > > > > diff --git a/meta-isar/classes/rpi-sdimg.bbclass > > b/meta-isar/classes/rpi-sdimg.bbclass index 91b09cd..4e5d170 100644 > > --- a/meta-isar/classes/rpi-sdimg.bbclass > > +++ b/meta-isar/classes/rpi-sdimg.bbclass > > @@ -15,7 +15,7 @@ BOOT_SPACE ?= "40960" > > IMAGE_ROOTFS_ALIGNMENT = "4096" > > > > SDIMG = "${DEPLOY_DIR_IMAGE}/${PN}.rpi-sdimg" > > -SDIMG_ROOTFS = "${EXT4_IMAGE_FILE}" > > +SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${EXT4_IMAGE_FILE}" > > > > do_rpi_sdimg () { > > # Align partitions > > diff --git a/meta/classes/ext4-img.bbclass > > b/meta/classes/ext4-img.bbclass index 29e5f77..2620de9 100644 > > --- a/meta/classes/ext4-img.bbclass > > +++ b/meta/classes/ext4-img.bbclass > > @@ -1,30 +1,23 @@ > > # This software is a part of ISAR. > > # Copyright (C) 2015-2017 ilbers GmbH > > > > -EXT4_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ext4.img" > > +EXT4_IMAGE_FILE = "${IMAGE_FULLNAME}.ext4.img" > > + > > +IMAGER_INSTALL += "e2fsprogs" > > > > do_ext4_image[stamp-extra-info] = "${DISTRO}-${MACHINE}" > > > > # Generate ext4 filesystem image > > do_ext4_image() { > > - rm -f ${EXT4_IMAGE_FILE} > > - > > - dd if=/dev/zero of=${EXT4_IMAGE_FILE} bs=1k count=${ROOTFS_SIZE} > > - > > - sudo mkfs.ext4 -F ${EXT4_IMAGE_FILE} > > - > > - mkdir -p ${WORKDIR}/mnt > > - sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt > > - _do_ext4_image_cleanup() { > > - ret=$? > > - sudo umount ${WORKDIR}/mnt 2>/dev/null || true > > - sudo rmdir ${WORKDIR}/mnt 2>/dev/null || true > > - (exit $ret) || bb_exit_handler > > - } > > - trap '_do_ext4_image_cleanup' EXIT > > - sudo cp -r ${IMAGE_ROOTFS}/* ${WORKDIR}/mnt > > - _do_ext4_image_cleanup > > + rm -f '${DEPLOY_DIR_IMAGE}/${EXT4_IMAGE_FILE}' > > + > > + truncate -s ${ROOTFS_SIZE}K > > '${DEPLOY_DIR_IMAGE}/${EXT4_IMAGE_FILE}' + > > + image_do_mounts > > + > > + sudo chroot ${BUILDCHROOT_DIR} /sbin/mke2fs ${MKE2FS_ARGS} \ > > + -F -d '${PP_ROOTFS}' > > '${PP_DEPLOY}/${EXT4_IMAGE_FILE}' } > > > > -addtask ext4_image before do_build after do_copy_boot_files > > +addtask ext4_image before do_build after do_copy_boot_files > > do_install_imager_deps do_ext4_image[prefuncs] = 'set_image_size' > >