From: cedric_hombourger@mentor.com
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/1] meta/ext4-img: refactor to fit current image creation methods
Date: Tue, 26 Feb 2019 03:35:17 -0800 (PST) [thread overview]
Message-ID: <6c0e6ea1-bd68-4ded-b6a0-2da66249cce5@googlegroups.com> (raw)
In-Reply-To: <20190219102555.1ce22459@md1za8fc.ad001.siemens.net>
[-- Attachment #1.1: Type: text/plain, Size: 3629 bytes --]
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 <javascript:>" <claudius....@siemens.com
> <javascript:>>
> wrote:
>
> > From: Claudius Heine <c...@denx.de <javascript:>>
> >
> > EXT4_IMAGE_FILE does no longer contain the full path to the ext4 image
> > in the deploy directory.
> >
> > Signed-off-by: Claudius Heine <c...@denx.de <javascript:>>
> > ---
> > 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'
>
>
[-- Attachment #1.2: Type: text/html, Size: 5362 bytes --]
next prev parent reply other threads:[~2019-02-26 11:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 13:04 [PATCH 0/1] Refactor ext4 image class claudius.heine.ext
2019-02-18 13:04 ` [PATCH 1/1] meta/ext4-img: refactor to fit current image creation methods claudius.heine.ext
2019-02-19 9:25 ` Henning Schild
2019-02-26 11:35 ` cedric_hombourger [this message]
2019-02-26 11:56 ` Jan Kiszka
2019-02-26 12:12 ` Henning Schild
2019-02-26 12:24 ` Hombourger, Cedric
2019-03-28 9:58 ` Maxim Yu. Osipov
2019-03-28 12:02 ` Hombourger, Cedric
2019-03-29 7:55 ` Adler, Michael
2019-03-29 8:45 ` Maxim Yu. Osipov
2019-02-27 9:28 ` [PATCH 0/1] Refactor ext4 image class Maxim Yu. Osipov
2019-03-28 12:40 ` Maxim Yu. Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c0e6ea1-bd68-4ded-b6a0-2da66249cce5@googlegroups.com \
--to=cedric_hombourger@mentor.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox