Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Christopher Larson <clarson@kergoth.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v3 0/6] bmaptool support
Date: Wed, 4 May 2016 09:59:13 +0300	[thread overview]
Message-ID: <20160504065913.GA10864@linux.intel.com> (raw)
In-Reply-To: <CABcZANk5bn=H6Q7SyMH9tmZFECoaicv55cJYVuyfxYsPRR_MNg@mail.gmail.com>

On Tue, May 03, 2016 at 08:22:48PM +0000, Christopher Larson wrote:
> On Mon, May 2, 2016 at 12:22 PM, Ed Bartosh <ed.bartosh@linux.intel.com>
> wrote:
> 
> > Hi,
> >
> > This patchset adds ability to use bmaptool to flash images faster than
> > using traditional methods. It contains bmap-tools recipe and generation
> > of .bmap files for the images generated by bitbake and wic.
> >
> > Bmaptool is a generic tool for creating the block map (bmap) for a file
> > and and copying files using the block map. The idea is that large file
> > containing unused blocks, like raw system image files, can be copied or
> > flashed a lot faster with bmaptool than with traditional tools like
> > "dd" or "cp".
> >
> > Here is an example of flashing image using dd and bmaptool showing
> > around 25% performance gain in flashing time:
> >
> > > ls -slh
> >  19M -rw-r--r-- 1 ed ed  26M Apr 26 11:36
> > core-image-minimal-qemux86-64-20160426083554.rootfs.ext4
> > 4.0K -rw-r--r-- 1 ed ed 2.7K Apr 26 11:36
> > core-image-minimal-qemux86-64-20160426083554.rootfs.ext4.bmap
> >
> > > time dd if=core-image-minimal-qemux86-64-20160426083554.rootfs.ext4
> > of=/dev/sdb
> > 52302+0 records in
> > 52302+0 records out
> > 26778624 bytes (27 MB) copied, 2.51183 s, 10.7 MB/s
> >
> > real    0m2.515s
> > user    0m0.014s
> > sys     0m0.329s
> >
> > > time bmaptool copy
> > core-image-minimal-qemux86-64-20160426083554.rootfs.ext4 /dev/sdb
> > bmaptool: info: discovered bmap file
> > 'core-image-minimal-qemux86-64-20160426083554.rootfs.ext4.bmap'
> > bmaptool: info: block map format version 2.0
> > bmaptool: info: 6538 blocks of size 4096 (25.5 MiB), mapped 4799 blocks
> > (18.7 MiB or 73.4%)
> > bmaptool: info: copying image
> > 'core-image-minimal-qemux86-64-20160426083554.rootfs.ext4' to block device
> > '/dev/sdb' using bmap file
> > 'core-image-minimal-qemux86-64-20160426083554.rootfs.ext4.bmap'
> > bmaptool: info: 100% copied
> > bmaptool: info: synchronizing '/dev/sdb'
> > bmaptool: info: copying time: 1.8s, copying speed 10.3 MiB/sec
> >
> > real    0m1.909s
> > user    0m0.226s
> > sys     0m0.052s
> >
> > The test was repeated 5 times with the same image and the same usb stick
> > device.
> >
> > Changes in v2: Combined Alexander's and my bmap-tools recipes.
> >                Got rid of generating standalone script as it breaks build
> > of bmap-tools-native.
> >
> > Changes in v3: Returned back generation of standalone bmaptool script
> >                Implemented --bmap option for wic
> >                Added test case to test bmap generation by wic --bmap
> 
> 
> I just wanted to say, this + the sparseness series is just awesome. Such a
> timesaver in my test cycle, particularly on my old macbook which has a usb
> 2.0 sd card reader :)

Thank you! I also think bmaptool is awesome utility. It can save lots of
flushing time especially for the 'very sparse' images.

I had this work in my TODO for quite long time. Now, thanks to Alexander who did
almost all hard work, it's eventually coming to oe/yocto.

--
Regards,
Ed


  reply	other threads:[~2016-05-04  9:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 12:22 [PATCH v3 0/6] bmaptool support Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 1/6] bmap-tools: initial commit, version 3.2 Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 2/6] image types: add bmap generation option Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 3/6] selftest: add bmap test Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 4/6] bmap-tools: generate standalone script Ed Bartosh
2016-05-03 19:31   ` Christopher Larson
2016-05-03 19:33     ` Christopher Larson
2016-05-04  7:01       ` Ed Bartosh
2016-05-04 18:55         ` Christopher Larson
2016-05-19 14:19           ` Alexander Kanevskiy
2016-05-19 14:54             ` Christopher Larson
2016-05-19 21:50               ` Alexander Kanevskiy
2016-05-19 21:53                 ` Christopher Larson
2016-05-13 17:13   ` Richard Purdie
2016-05-18 12:34     ` [wic][PATCH 1/4] wic: add bmaptool to the list of utilities Ed Bartosh
2016-05-18 12:34       ` [wic][PATCH 2/4] wic: implement --bmap option Ed Bartosh
2016-05-18 12:34       ` [wic][PATCH 3/4] wic: add help for --bmap commandline option Ed Bartosh
2016-05-18 12:34       ` [wic][PATCH 4/4] oe-selftest: wic: add test_bmap test case Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 5/6] wic: implement --bmap option Ed Bartosh
2016-05-02 12:22 ` [PATCH v3 6/6] oe-selftest: wic: add test_bmap test case Ed Bartosh
2016-05-03 20:22 ` [PATCH v3 0/6] bmaptool support Christopher Larson
2016-05-04  6:59   ` Ed Bartosh [this message]
2016-05-13 17:11 ` Richard Purdie

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=20160504065913.GA10864@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=clarson@kergoth.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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