[OE-core] [PATCH v3 0/6] bmaptool support

Christopher Larson clarson at kergoth.com
Tue May 3 20:22:48 UTC 2016


On Mon, May 2, 2016 at 12:22 PM, Ed Bartosh <ed.bartosh at 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 :)
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160503/30612a77/attachment-0002.html>


More information about the Openembedded-core mailing list