summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-01-03 14:15:31 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:23:18 +0000
commit3ecc502b8dcad84e23031589671b918cdd6a2487 (patch)
treea257ef6a005ea71d26c07d51fa8b84cbdf3ccfc6 /documentation
parenta8e9faac4053afe57352eba62da5e9693952e260 (diff)
downloadpoky-3ecc502b8dcad84e23031589671b918cdd6a2487.tar.gz
dev-manual: Added section on bmap-tool to flash images
Fixes [YOCTO #10621] bmaptool is integrated into the OpenEmbedded build system but is not documented. I added a new section describing how to flash an image to media using the tool. Also, updated a small section in the Wic part of the manual that used "dd" to flash an example. I added a bmaptool counterpart here and referenced the reader back to the main new section. (From yocto-docs rev: 98ebe9acccceea2b833c1372a3e664befd1b6aef) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml33
-rw-r--r--documentation/dev-manual/dev-manual-start.xml63
2 files changed, 40 insertions, 56 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 95289c990f..811c23e810 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -4824,36 +4824,23 @@
4824 4824
4825 <para> 4825 <para>
4826 Continuing with the example, you can now write the 4826 Continuing with the example, you can now write the
4827 image to a USB stick, or whatever media for which 4827 image to a USB stick, or whatever media for which you
4828 you built your image, and boot the resulting media. 4828 built your image, and boot the resulting media.
4829 </para> 4829 You can write the image by using
4830 4830 <filename>bmaptool</filename> or
4831 <para> 4831 <filename>dd</filename>:
4832 The following example uses <filename>dd</filename>
4833 to write the image to a USB stick:
4834 <literallayout class='monospaced'> 4832 <literallayout class='monospaced'>
4835 $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct of=/dev/sdb 4833 $ oe-run-native bmaptool copy /var/tmp/wic/build/mkefidisk-201310230946-sda.direct /dev/sd<replaceable>X</replaceable>
4836 [sudo] password for trz:
4837 182274+0 records in
4838 182274+0 records out
4839 93324288 bytes (93 MB) copied, 14.4777 s, 6.4 MB/s
4840 [trz at empanada ~]$ sudo eject /dev/sdb
4841 </literallayout> 4834 </literallayout>
4842 </para> 4835 or
4843
4844 <para>
4845 This next example uses the
4846 <filename>bmap-tool</filename>.
4847 For this example, it is assumed you have write
4848 access:
4849 <literallayout class='monospaced'> 4836 <literallayout class='monospaced'>
4850 $ oe-run-native bmap-tool copy /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks /dev/sdb 4837 $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct of=/dev/sd<replaceable>X</replaceable>
4851 </literallayout> 4838 </literallayout>
4852 <note> 4839 <note>
4853 For more information on how to use the 4840 For more information on how to use the
4854 <filename>bmap-tool</filename> to flash a device 4841 <filename>bmaptool</filename> to flash a device
4855 with an image, see the 4842 with an image, see the
4856 "<link linkend='flashing-images-using-bmap-tool'>Flashing Images Using <filename>bmap-tool</filename></link>" 4843 "<link linkend='flashing-images-using-bmaptool'>Flashing Images Using <filename>bmaptool</filename></link>"
4857 section. 4844 section.
4858 </note> 4845 </note>
4859 </para> 4846 </para>
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml
index bcee11ba22..fd7e03f1aa 100644
--- a/documentation/dev-manual/dev-manual-start.xml
+++ b/documentation/dev-manual/dev-manual-start.xml
@@ -328,29 +328,39 @@
328 </para> 328 </para>
329</section> 329</section>
330 330
331<section id='flashing-images-using-bmap-tool'> 331<section id='flashing-images-using-bmaptool'>
332 <title>Flashing Images Using <filename>bmap-tool</filename></title> 332 <title>Flashing Images Using <filename>bmaptool</filename></title>
333 333
334 <para> 334 <para>
335 An easy way to flash an image to a bootable device is to use 335 An easy way to flash an image to a bootable device is to use
336 <filename>bmap-tool</filename>, which is integrated into the 336 <filename>bmaptool</filename>, which is integrated into the
337 OpenEmbedded build system. 337 OpenEmbedded build system.
338 </para> 338 </para>
339 339
340 <para> 340 <para>
341 Following, is an example that shows how to flash a Wic image. 341 Following, is an example that shows how to flash a Wic image.
342 <note> 342 <note>
343 You can use <filename>bmap-tool</filename> to flash any 343 You can use <filename>bmaptool</filename> to flash any
344 type of image. 344 type of image.
345 </note> 345 </note>
346 Use these steps to flash an image using 346 Use these steps to flash an image using
347 <filename>bmap-tool</filename>: 347 <filename>bmaptool</filename>:
348 <note>
349 Unless you are able to install the
350 <filename>bmap-tools</filename> package as mentioned in the note
351 in the second bullet of step 3 further down, you will need to build
352 <filename>bmaptool</filename> before using it.
353 Build the tool using the following command:
354 <literallayout class='monospaced'>
355 $ bitbake bmap-tools-native
356 </literallayout>
357 </note>
348 <orderedlist> 358 <orderedlist>
349 <listitem><para> 359 <listitem><para>
350 Add the following to your <filename>local.conf</filename> 360 Add the following to your <filename>local.conf</filename>
351 file: 361 file:
352 <literallayout class='monospaced'> 362 <literallayout class='monospaced'>
353 IMAGE_FSTYPES += "WIC WIC.BMAP" 363 IMAGE_FSTYPES += "wic wic.bmap"
354 </literallayout> 364 </literallayout>
355 </para></listitem> 365 </para></listitem>
356 <listitem><para> 366 <listitem><para>
@@ -361,33 +371,35 @@
361 </literallayout> 371 </literallayout>
362 </para></listitem> 372 </para></listitem>
363 <listitem><para> 373 <listitem><para>
364 Flash the image to the media by using the 374 Flash the image to the media by using
365 <filename>bmap-tool</filename> depending on your particular 375 <filename>bmaptool</filename> depending on your particular
366 setup: 376 setup:
367 <itemizedlist> 377 <itemizedlist>
368 <listitem><para> 378 <listitem><para>
369 If you have write access, use this command form: 379 If you have write access to the media,
380 use this command form:
370 <literallayout class='monospaced'> 381 <literallayout class='monospaced'>
371 $ oe-run-native bmap-tool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable> 382 $ oe-run-native bmaptool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
372 </literallayout> 383 </literallayout>
373 </para></listitem> 384 </para></listitem>
374 <listitem><para> 385 <listitem><para>
375 If you do not have write access, use the following 386 If you do not have write access to
387 the media, use the following
376 commands: 388 commands:
377 <literallayout class='monospaced'> 389 <literallayout class='monospaced'>
378 $ sudo bash 390 $ sudo bash
379 $ PATH=tmp/sysroots/x86_64-linux/usr/bin/ bmaptool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable> 391 $ PATH=tmp/sysroots/x86_64-linux/usr/bin/ bmaptool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
380 </literallayout> 392 </literallayout>
381 <note> 393 <note>
382 If you are using Ubuntu 16.10 or Debian, 394 If you are using Ubuntu or Debian distributions,
383 you can install 395 you can install the
384 <filename>bmaptool</filename> using the 396 <filename>bmap-tools</filename> package using the
385 following command and then use the tool 397 following command and then use the tool
386 without specifying 398 without specifying
387 <filename>PATH</filename> even from the 399 <filename>PATH</filename> even from the
388 root account: 400 root account:
389 <literallayout class='monospaced'> 401 <literallayout class='monospaced'>
390 $ sudo apt-get install bmap-tool 402 $ sudo apt-get install bmap-tools
391 </literallayout> 403 </literallayout>
392 </note> 404 </note>
393 </para></listitem> 405 </para></listitem>
@@ -397,26 +409,11 @@
397 </para> 409 </para>
398 410
399 <para> 411 <para>
400 For help on the <filename>bmaptool</filename> command, use 412 For help on the <filename>bmaptool</filename> command, use either of
401 <filename>bmaptool --help</filename>: 413 the following commands:
402 <literallayout class='monospaced'> 414 <literallayout class='monospaced'>
403 $ bmaptool --help 415 $ bmaptool --help
404 usage: bmaptool [-h] [--version] [-q] [-d] {create,copy} ... 416 $ oe-run-native bmaptool --help
405
406 Create block map (bmap) and copy files using bmap. The documentation can be
407 found here: source.tizen.org/documentation/reference/bmaptool
408
409 optional arguments:
410 -h, --help show this help message and exit
411 --version show program's version number and exit
412 -q, --quiet be quiet
413 -d, --debug print debugging information
414
415 subcommands:
416 {create,copy}
417 create generate bmap for an image file (which should be a sparse
418 file)
419 copy write an image to a block device using bmap
420 </literallayout> 417 </literallayout>
421 </para> 418 </para>
422</section> 419</section>