From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v6 2/5] package/bmap-tools: enable host package
Date: Fri, 25 Jun 2021 14:35:32 +0200 [thread overview]
Message-ID: <20210625123532.GC104638@scaer> (raw)
In-Reply-To: <20210621210111.363433-3-thomas.petazzoni@bootlin.com>
Thomas, All,
On 2021-06-21 23:01 +0200, Thomas Petazzoni spake thusly:
> bmaptool allows to drastically reduce the amount of data to transfer
> when writing to an SD card. Example with a 544 MiB sdcard.img:
>
> $ bmaptool create sdcard.img > sdcard.bmap
> $ gzip sdcard.img
> $ bmaptool copy sdcard.img.gz /dev/sdc
> bmaptool: info: discovered bmap file 'sdcard.bmap'
> bmaptool: info: block map format version 2.0
> bmaptool: info: 139265 blocks of size 4096 (544.0 MiB), mapped 23918 blocks (93.4 MiB or 17.2%)
> bmaptool: info: copying image 'sdcard.img.gz' to block device '/dev/sdc' using bmap file 'sdcard.bmap'
> bmaptool: info: 100% copied
> bmaptool: info: synchronizing '/dev/sdc'
> bmaptool: info: copying time: 7.7s, copying speed 12.1 MiB/sec
>
> So it means that instead of writing 544 MiB, only 93.4 MiB had to be
> written.
>
> In terms of implementation details, compared to the target bmap-tools
> package, there are fewer "selects" that are needed because:
>
> - The dependency on setuptools is not needed, because the package
> uses the setuptools SETUP_TYPE, so host-python-setuptools is
> already a build dependency.
>
> - host-python and host-python3 are always built with Expat XML
> support.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/Config.in.host | 1 +
> package/bmap-tools/Config.in.host | 12 ++++++++++++
> package/bmap-tools/bmap-tools.mk | 1 +
> 3 files changed, 14 insertions(+)
> create mode 100644 package/bmap-tools/Config.in.host
>
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 064c98af3d..8d443ea255 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -5,6 +5,7 @@ menu "Host utilities"
> source "package/android-tools/Config.in.host"
> source "package/asn1c/Config.in.host"
> source "package/babeltrace2/Config.in.host"
> + source "package/bmap-tools/Config.in.host"
> source "package/btrfs-progs/Config.in.host"
> source "package/cbootimage/Config.in.host"
> source "package/checkpolicy/Config.in.host"
> diff --git a/package/bmap-tools/Config.in.host b/package/bmap-tools/Config.in.host
> new file mode 100644
> index 0000000000..a20829030d
> --- /dev/null
> +++ b/package/bmap-tools/Config.in.host
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_HOST_BMAP_TOOLS
> + bool "host bmap-tools"
> + select BR2_PACKAGE_HOST_PYTHON_SIX # runtime
> + help
> + Tool to flash image files to block devices using the block map
> + bmaptool is a generic tool for creating the block map (bmap)
> + for a file, 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".
> +
> + https://github.com/intel/bmap-tools
> diff --git a/package/bmap-tools/bmap-tools.mk b/package/bmap-tools/bmap-tools.mk
> index c8b41c225f..32399ca151 100644
> --- a/package/bmap-tools/bmap-tools.mk
> +++ b/package/bmap-tools/bmap-tools.mk
> @@ -11,3 +11,4 @@ BMAP_TOOLS_LICENSE_FILES = COPYING
> BMAP_TOOLS_SETUP_TYPE = setuptools
>
> $(eval $(python-package))
> +$(eval $(host-python-package))
> --
> 2.31.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2021-06-25 12:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 21:01 [Buildroot] [PATCH v6 0/5] Introduce bmap-tools as target + host package Thomas Petazzoni
2021-06-21 21:01 ` [Buildroot] [PATCH v6 1/5] package/bmap-tools: new package Thomas Petazzoni
2021-06-25 12:35 ` Yann E. MORIN
2021-06-25 12:45 ` Thomas Petazzoni
2021-06-25 12:54 ` Yann E. MORIN
2021-06-25 13:57 ` Thomas Petazzoni
2021-06-21 21:01 ` [Buildroot] [PATCH v6 2/5] package/bmap-tools: enable host package Thomas Petazzoni
2021-06-25 12:35 ` Yann E. MORIN [this message]
2021-06-21 21:01 ` [Buildroot] [PATCH v6 3/5] support/testing/infra/emulator.py: update pre-built kernels Thomas Petazzoni
2021-06-25 12:35 ` Yann E. MORIN
2021-06-26 20:07 ` Yann E. MORIN
2021-06-21 21:01 ` [Buildroot] [PATCH v6 4/5] support/testing/tests/package/test_bmap_tools: new test Thomas Petazzoni
2021-06-25 12:36 ` Yann E. MORIN
2021-06-25 12:46 ` Thomas Petazzoni
2021-06-21 21:01 ` [Buildroot] [PATCH v6 5/5] support/testing/tests/package/test_bmap_tools: add test for host bmap-tools Thomas Petazzoni
2021-06-25 12:38 ` Yann E. MORIN
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=20210625123532.GC104638@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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