summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-02-23 10:19:29 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-03 08:35:25 +0000
commit505a31c1a17bd6aad48864f947d0e79ce7940897 (patch)
treef55f48211c845d5c4e0e47fc64d7400973f28d4e /documentation
parent01658a83d7edccaa06eec955a6067f7cb08db7ef (diff)
downloadpoky-505a31c1a17bd6aad48864f947d0e79ce7940897.tar.gz
dev-manual: Updated Bmaptool section.
Provided a better flow and a bit more explanation of what Bmaptool provides. (From yocto-docs rev: 9a02cd7281038031fc4cdea98f114b9c318947a7) 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.xml100
1 files changed, 54 insertions, 46 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 908530cd0e..60af73d0ed 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -6253,79 +6253,87 @@ Some notes from Cal:
6253 <title>Flashing Images Using <filename>bmaptool</filename></title> 6253 <title>Flashing Images Using <filename>bmaptool</filename></title>
6254 6254
6255 <para> 6255 <para>
6256 An easy way to flash an image to a bootable device is to use 6256 A fast and easy way to flash an image to a bootable device
6257 <filename>bmaptool</filename>, which is integrated into the 6257 is to use Bmaptool, which is integrated into the OpenEmbedded
6258 OpenEmbedded build system. 6258 build system.
6259 Bmaptool is a generic tool that creates a file's block map (bmap)
6260 and then uses that map to copy the file.
6261 As compared to traditional tools such as dd or cp, Bmaptool
6262 can copy (or flash) large files like raw system image files
6263 much faster.
6264 <note><title>Notes</title>
6265 <itemizedlist>
6266 <listitem><para>
6267 If you are using Ubuntu or Debian distributions, you
6268 can install the <filename>bmap-tools</filename> package
6269 using the following command and then use the tool
6270 without specifying <filename>PATH</filename> even from
6271 the root account:
6272 <literallayout class='monospaced'>
6273 $ sudo apt-get install bmap-tools
6274 </literallayout>
6275 </para></listitem>
6276 <listitem><para>
6277 If you are unable to install the
6278 <filename>bmap-tools</filename> package, you will
6279 need to build Bmaptool before using it.
6280 Use the following command:
6281 <literallayout class='monospaced'>
6282 $ bitbake bmap-tools-native
6283 </literallayout>
6284 </para></listitem>
6285 </itemizedlist>
6286 </note>
6259 </para> 6287 </para>
6260 6288
6261 <para> 6289 <para>
6262 Following, is an example that shows how to flash a Wic image. 6290 Following, is an example that shows how to flash a Wic image.
6263 <note> 6291 Realize that while this example uses a Wic image, you can use
6264 You can use <filename>bmaptool</filename> to flash any 6292 Bmaptool to flash any type of image.
6265 type of image. 6293 Use these steps to flash an image using Bmaptool:
6266 </note>
6267 Use these steps to flash an image using
6268 <filename>bmaptool</filename>:
6269 <note>
6270 Unless you are able to install the
6271 <filename>bmap-tools</filename> package as mentioned in the note
6272 in the second bullet of step 3 further down, you will need to build
6273 <filename>bmaptool</filename> before using it.
6274 Build the tool using the following command:
6275 <literallayout class='monospaced'>
6276 $ bitbake bmap-tools-native
6277 </literallayout>
6278 </note>
6279 <orderedlist> 6294 <orderedlist>
6280 <listitem><para> 6295 <listitem><para>
6281 <emphasis>Update the <filename>local.conf</filename> File:</emphasis> 6296 <emphasis>Update your <filename>local.conf</filename> File:</emphasis>
6282 Add the following to your <filename>local.conf</filename> 6297 You need to have the following set in your
6283 file: 6298 <filename>local.conf</filename> file before building
6299 your image:
6284 <literallayout class='monospaced'> 6300 <literallayout class='monospaced'>
6285 IMAGE_FSTYPES += "wic wic.bmap" 6301 IMAGE_FSTYPES += "wic wic.bmap"
6286 </literallayout> 6302 </literallayout>
6287 </para></listitem> 6303 </para></listitem>
6288 <listitem><para> 6304 <listitem><para>
6289 <emphasis>Get Your Image:</emphasis> 6305 <emphasis>Get Your Image:</emphasis>
6290 Either have your image ready (pre-built) or take the step 6306 Either have your image ready (pre-built with the
6291 build the image: 6307 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
6308 setting previously mentioned) or take the step to build
6309 the image:
6292 <literallayout class='monospaced'> 6310 <literallayout class='monospaced'>
6293 $ bitbake <replaceable>image</replaceable> 6311 $ bitbake <replaceable>image</replaceable>
6294 </literallayout> 6312 </literallayout>
6295 </para></listitem> 6313 </para></listitem>
6296 <listitem><para> 6314 <listitem><para>
6297 <emphasis>Flash the Device:</emphasis> 6315 <emphasis>Flash the Device:</emphasis>
6298 Flash the device with the image by using 6316 Flash the device with the image by using Bmaptool
6299 <filename>bmaptool</filename> depending on your particular 6317 depending on your particular setup.
6300 setup: 6318 The following commands assume the image resides in the
6319 Build Directory's <filename>deploy/images/</filename>
6320 area:
6301 <itemizedlist> 6321 <itemizedlist>
6302 <listitem><para> 6322 <listitem><para>
6303 If you have write access to the media, 6323 If you have write access to the media, use this
6304 use this command form: 6324 command form:
6305 <literallayout class='monospaced'> 6325 <literallayout class='monospaced'>
6306 $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable> 6326 $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
6307 </literallayout> 6327 </literallayout>
6308 </para></listitem> 6328 </para></listitem>
6309 <listitem><para> 6329 <listitem><para>
6310 If you do not have write access to 6330 If you do not have write access to the media, set
6311 the media, use the following 6331 your permissions first and then use the same
6312 commands: 6332 command form:
6313 <literallayout class='monospaced'> 6333 <literallayout class='monospaced'>
6314 $ sudo chmod 666 /dev/sd<replaceable>X</replaceable> 6334 $ sudo chmod 666 /dev/sd<replaceable>X</replaceable>
6315 $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable> 6335 $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
6316 </literallayout> 6336 </literallayout>
6317 <note>
6318 If you are using Ubuntu or Debian distributions,
6319 you can install the
6320 <filename>bmap-tools</filename> package using
6321 the following command and then use the tool
6322 without specifying
6323 <filename>PATH</filename> even from the
6324 root account:
6325 <literallayout class='monospaced'>
6326 $ sudo apt-get install bmap-tools
6327 </literallayout>
6328 </note>
6329 </para></listitem> 6337 </para></listitem>
6330 </itemizedlist> 6338 </itemizedlist>
6331 </para></listitem> 6339 </para></listitem>