summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/bmaptool.rst
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-11-24 17:50:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-01 19:20:29 +0000
commit945c669138a76be18c6b4da4f8f907d2a5cfd83f (patch)
treecebff3cae5021d4fcceb5aa51fce1c2aead97ed2 /documentation/dev-manual/bmaptool.rst
parent6fe3143800925463279d0664fc7f3372b53c6c52 (diff)
downloadpoky-945c669138a76be18c6b4da4f8f907d2a5cfd83f.tar.gz
manuals: split dev-manual/common-tasks.rst
A 500 KB source file is always harder to manage, and can have section title conflicts. So, the "Common Tasks" document is gone and all its constituents are moved up one level. You now have 40 chapters in the Development Tasks Manual. (From yocto-docs rev: 8a45bc469411410020b8e688c137395fcaf3761b) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/bmaptool.rst')
-rw-r--r--documentation/dev-manual/bmaptool.rst59
1 files changed, 59 insertions, 0 deletions
diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
new file mode 100644
index 0000000000..4ee6f5e48b
--- /dev/null
+++ b/documentation/dev-manual/bmaptool.rst
@@ -0,0 +1,59 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Flashing Images Using ``bmaptool``
4**********************************
5
6A fast and easy way to flash an image to a bootable device is to use
7Bmaptool, which is integrated into the OpenEmbedded build system.
8Bmaptool is a generic tool that creates a file's block map (bmap) and
9then uses that map to copy the file. As compared to traditional tools
10such as dd or cp, Bmaptool can copy (or flash) large files like raw
11system image files much faster.
12
13.. note::
14
15 - If you are using Ubuntu or Debian distributions, you can install
16 the ``bmap-tools`` package using the following command and then
17 use the tool without specifying ``PATH`` even from the root
18 account::
19
20 $ sudo apt install bmap-tools
21
22 - If you are unable to install the ``bmap-tools`` package, you will
23 need to build Bmaptool before using it. Use the following command::
24
25 $ bitbake bmap-tools-native
26
27Following, is an example that shows how to flash a Wic image. Realize
28that while this example uses a Wic image, you can use Bmaptool to flash
29any type of image. Use these steps to flash an image using Bmaptool:
30
311. *Update your local.conf File:* You need to have the following set
32 in your ``local.conf`` file before building your image::
33
34 IMAGE_FSTYPES += "wic wic.bmap"
35
362. *Get Your Image:* Either have your image ready (pre-built with the
37 :term:`IMAGE_FSTYPES`
38 setting previously mentioned) or take the step to build the image::
39
40 $ bitbake image
41
423. *Flash the Device:* Flash the device with the image by using Bmaptool
43 depending on your particular setup. The following commands assume the
44 image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
45
46 - If you have write access to the media, use this command form::
47
48 $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
49
50 - If you do not have write access to the media, set your permissions
51 first and then use the same command form::
52
53 $ sudo chmod 666 /dev/sdX
54 $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
55
56For help on the ``bmaptool`` command, use the following command::
57
58 $ bmaptool --help
59