From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: benjamin.esquivel@linux.intel.com
Cc: paul.eggleton@linux.intel.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 3/3] Empty image: filesystem allocation
Date: Fri, 11 Sep 2015 23:32:18 +0100 [thread overview]
Message-ID: <1442010738.24871.458.camel@linuxfoundation.org> (raw)
In-Reply-To: <1441992374.14702.12.camel@linux.intel.com>
On Fri, 2015-09-11 at 12:26 -0500, Benjamin Esquivel wrote:
> Hi Alejandro,
>
> On Wed, 2015-08-26 at 16:57 -0500, Alex Franco wrote:
> > Increase sparse image block size when ROOTFS_SIZE is smaller than
> > the minimum needed for ext4 to fit into it.
> >
> > [YOCTO #7664]
> >
> > Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
> > ---
> > meta/classes/image_types.bbclass | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/image_types.bbclass
> > b/meta/classes/image_types.bbclass
> > index 35ceb7b..61ce222 100644
> > --- a/meta/classes/image_types.bbclass
> > +++ b/meta/classes/image_types.bbclass
> > @@ -49,8 +49,16 @@ oe_mkext234fs () {
> > extra_imagecmd=$@
> > fi
> >
> > + # If generating an empty image the size of the sparse block
> > should be large
> > + # enough to allocate an ext4 filesystem using 4096 bytes per
> > inode, this is
> > + # about 60K, so dd needs a minimum count of 60, with bs=1024
> > (bytes per IO)
> > + eval local COUNT=\"0\"
> > + eval local MIN_COUNT=\"60\"
> > + if [ $ROOTFS_SIZE -lt $MIN_COUNT ]; then
> > + eval COUNT=\"$MIN_COUNT\"
> > + fi
> > # Create a sparse image block
> > - dd if=/dev/zero
> > of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$fstype seek=$ROOTFS_SIZE
> > count=0 bs=1k
> > + dd if=/dev/zero
> > of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$fstype seek=$ROOTFS_SIZE
> > count=$COUNT bs=1024
> Variable references enclosed in {} are less prone to misinterpretation.
They are however more likely to get expanded by bitbake before you'd
expect them to be unfortunately :(
Cheers,
Richard
> > mkfs.$fstype -F $extra_imagecmd
> > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$fstype -d ${IMAGE_ROOTFS}
> > }
> >
> > --
> > 2.5.0
> >
next prev parent reply other threads:[~2015-09-11 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 21:57 [PATCH 0/3] Empty-image functionality Alex Franco
2015-08-26 21:57 ` [PATCH 1/3] Empty image: core-image-empty recipe, Rootfs fix Alex Franco
2015-08-29 11:18 ` Paul Eggleton
2015-09-08 23:20 ` Alex Franco
2015-08-26 21:57 ` [PATCH 2/3] Empty image: package list splitting and iteration Alex Franco
2015-08-26 21:57 ` [PATCH 3/3] Empty image: filesystem allocation Alex Franco
2015-09-11 17:26 ` Benjamin Esquivel
2015-09-11 22:32 ` Richard Purdie [this message]
2015-08-28 18:23 ` [PATCH 0/3] Empty-image functionality Aníbal Limón
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=1442010738.24871.458.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=benjamin.esquivel@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul.eggleton@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.