* [PATCH v2 0/3] Improvements to "bmaptool" usage documentation
@ 2024-12-04 10:44 michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 1/3] dev-manual: fix styling of references to bmaptool michael.opdenacker
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: michael.opdenacker @ 2024-12-04 10:44 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
- Changes in V2:
- Fix typo in "sudo" (thanks to Ulrich Ölmann)
- Use "chmod a+w" instead of "chmod o+w",
and put this right before calling "oe-run-native"
(thanks to Antonin Godard)
- Remove "bitbake bmaptool-native" as
"bitbake bmaptool-native -caddto_recipe_sysroot" is enough
(thanks to Antonin Godard)
Michael Opdenacker (3):
dev-manual: fix styling of references to bmaptool
dev-manual/bmaptool.rst: correct command for bmaptool-native
dev-manual/bmaptool.rst: simplify and fix instructions
documentation/dev-manual/bmaptool.rst | 32 ++++++++++++++-------------
documentation/dev-manual/wic.rst | 4 ++--
2 files changed, 19 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] dev-manual: fix styling of references to bmaptool
2024-12-04 10:44 [PATCH v2 0/3] Improvements to "bmaptool" usage documentation michael.opdenacker
@ 2024-12-04 10:44 ` michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 2/3] dev-manual/bmaptool.rst: correct command for bmaptool-native michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions michael.opdenacker
2 siblings, 0 replies; 8+ messages in thread
From: michael.opdenacker @ 2024-12-04 10:44 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To follow the styling conventions when we are
refering to the name of a tool instead of the command itself
(documentation/standards.md).
This also improves the HTML rendering of the bmaptools subsection.
Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
---
documentation/dev-manual/bmaptool.rst | 18 +++++++++---------
documentation/dev-manual/wic.rst | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
index f6f0e6afaf..493abf7607 100644
--- a/documentation/dev-manual/bmaptool.rst
+++ b/documentation/dev-manual/bmaptool.rst
@@ -1,13 +1,13 @@
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
-Flashing Images Using ``bmaptool``
-**********************************
+Flashing Images Using `bmaptool`
+********************************
A fast and easy way to flash an image to a bootable device is to use
-bmaptool, which is integrated into the OpenEmbedded build system.
-bmaptool is a generic tool that creates a file's block map (bmap) and
+`bmaptool`, which is integrated into the OpenEmbedded build system.
+`bmaptool` is a generic tool that creates a file's block map (bmap) and
then uses that map to copy the file. As compared to traditional tools
-such as dd or cp, bmaptool can copy (or flash) large files like raw
+such as `dd` or `cp`, `bmaptool` can copy (or flash) large files like raw
system image files much faster.
.. note::
@@ -20,13 +20,13 @@ system image files much faster.
$ sudo apt install bmap-tools
- If you are unable to install the ``bmap-tools`` package, you will
- need to build bmaptool before using it. Use the following command::
+ need to build `bmaptool` before using it. Use the following command::
$ bitbake bmaptool-native
Following, is an example that shows how to flash a Wic image. Realize
-that while this example uses a Wic image, you can use bmaptool to flash
-any type of image. Use these steps to flash an image using bmaptool:
+that while this example uses a Wic image, you can use `bmaptool` to flash
+any type of image. Use these steps to flash an image using `bmaptool`:
#. *Update your local.conf File:* You need to have the following set
in your ``local.conf`` file before building your image::
@@ -39,7 +39,7 @@ any type of image. Use these steps to flash an image using bmaptool:
$ bitbake image
-#. *Flash the Device:* Flash the device with the image by using bmaptool
+#. *Flash the Device:* Flash the device with the image by using `bmaptool`
depending on your particular setup. The following commands assume the
image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
diff --git a/documentation/dev-manual/wic.rst b/documentation/dev-manual/wic.rst
index a3880f3a1c..fced0e170c 100644
--- a/documentation/dev-manual/wic.rst
+++ b/documentation/dev-manual/wic.rst
@@ -513,7 +513,7 @@ or ::
For more information on how to use the ``bmaptool``
to flash a device with an image, see the
- ":ref:`dev-manual/bmaptool:flashing images using \`\`bmaptool\`\``"
+ ":ref:`dev-manual/bmaptool:flashing images using \`bmaptool\``"
section.
Using a Modified Kickstart File
@@ -721,7 +721,7 @@ the existing kernel, and then inserts a new kernel:
Once the new kernel is added back into the image, you can use the
``dd`` command or :ref:`bmaptool
- <dev-manual/bmaptool:flashing images using \`\`bmaptool\`\`>`
+ <dev-manual/bmaptool:flashing images using \`bmaptool\`>` commands
to flash your wic image onto an SD card or USB stick and test your
target.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] dev-manual/bmaptool.rst: correct command for bmaptool-native
2024-12-04 10:44 [PATCH v2 0/3] Improvements to "bmaptool" usage documentation michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 1/3] dev-manual: fix styling of references to bmaptool michael.opdenacker
@ 2024-12-04 10:44 ` michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions michael.opdenacker
2 siblings, 0 replies; 8+ messages in thread
From: michael.opdenacker @ 2024-12-04 10:44 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Using only "bitbake bmaptool-native", running "oe-run-native bmaptool-native bmaptool ..."
fails as follows:
Error: Have you run 'bitbake bmaptool-native -caddto_recipe_sysroot'?
Running the "bitbake bmaptool-native -caddto_recipe_sysroot" target
is actually sufficient.
Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
---
documentation/dev-manual/bmaptool.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
index 493abf7607..37083c9c64 100644
--- a/documentation/dev-manual/bmaptool.rst
+++ b/documentation/dev-manual/bmaptool.rst
@@ -22,7 +22,7 @@ system image files much faster.
- If you are unable to install the ``bmap-tools`` package, you will
need to build `bmaptool` before using it. Use the following command::
- $ bitbake bmaptool-native
+ $ bitbake bmaptool-native -caddto_recipe_sysroot
Following, is an example that shows how to flash a Wic image. Realize
that while this example uses a Wic image, you can use `bmaptool` to flash
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions
2024-12-04 10:44 [PATCH v2 0/3] Improvements to "bmaptool" usage documentation michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 1/3] dev-manual: fix styling of references to bmaptool michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 2/3] dev-manual/bmaptool.rst: correct command for bmaptool-native michael.opdenacker
@ 2024-12-04 10:44 ` michael.opdenacker
2024-12-04 12:19 ` [docs] " Antonin Godard
2 siblings, 1 reply; 8+ messages in thread
From: michael.opdenacker @ 2024-12-04 10:44 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
- Remove duplicate instructions
- Detail how to run bmaptool directly if you installed it on your host
instead of building it through the ``bmaptool-native`` recipe,
as running "oe-run-native bmaptool-native bmaptool ..." won't work
in this case.
Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
---
documentation/dev-manual/bmaptool.rst | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
index 37083c9c64..93c8d3a45e 100644
--- a/documentation/dev-manual/bmaptool.rst
+++ b/documentation/dev-manual/bmaptool.rst
@@ -43,14 +43,16 @@ any type of image. Use these steps to flash an image using `bmaptool`:
depending on your particular setup. The following commands assume the
image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
- - If you have write access to the media, use this command form::
+ - If needed, set permissions to get write access to the media::
- $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
+ $ sudo chmod 666 /dev/sdX
- - If you do not have write access to the media, set your permissions
- first and then use the same command form::
+ - If you installed the package for `bmaptool`, you can directly run::
+
+ $ sudo bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
+
+ - Otherwise, if you built `bmaptool` with BitBake, run::
- $ sudo chmod 666 /dev/sdX
$ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
For help on the ``bmaptool`` command, use the following command::
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [docs] [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions
2024-12-04 10:44 ` [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions michael.opdenacker
@ 2024-12-04 12:19 ` Antonin Godard
2024-12-04 13:03 ` Michael Opdenacker
0 siblings, 1 reply; 8+ messages in thread
From: Antonin Godard @ 2024-12-04 12:19 UTC (permalink / raw)
To: michael.opdenacker, docs
On Wed Dec 4, 2024 at 11:44 AM CET, Michael Opdenacker via lists.yoctoproject.org wrote:
> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>
> - Remove duplicate instructions
>
> - Detail how to run bmaptool directly if you installed it on your host
> instead of building it through the ``bmaptool-native`` recipe,
> as running "oe-run-native bmaptool-native bmaptool ..." won't work
> in this case.
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
> ---
> documentation/dev-manual/bmaptool.rst | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
> index 37083c9c64..93c8d3a45e 100644
> --- a/documentation/dev-manual/bmaptool.rst
> +++ b/documentation/dev-manual/bmaptool.rst
> @@ -43,14 +43,16 @@ any type of image. Use these steps to flash an image using `bmaptool`:
> depending on your particular setup. The following commands assume the
> image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
>
> - - If you have write access to the media, use this command form::
> + - If needed, set permissions to get write access to the media::
>
> - $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
> + $ sudo chmod 666 /dev/sdX
I think you forgot to change to "a+w"
Also, it wasn't moved after the sudo command?
Looks like the wrong patch may have slipped in? :)
> - - If you do not have write access to the media, set your permissions
> - first and then use the same command form::
> + - If you installed the package for `bmaptool`, you can directly run::
> +
> + $ sudo bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
> +
> + - Otherwise, if you built `bmaptool` with BitBake, run::
>
> - $ sudo chmod 666 /dev/sdX
> $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
>
> For help on the ``bmaptool`` command, use the following command::
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [docs] [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions
2024-12-04 12:19 ` [docs] " Antonin Godard
@ 2024-12-04 13:03 ` Michael Opdenacker
2024-12-18 9:35 ` Antonin Godard
0 siblings, 1 reply; 8+ messages in thread
From: Michael Opdenacker @ 2024-12-04 13:03 UTC (permalink / raw)
To: Antonin Godard, docs; +Cc: michael.opdenacker
Hi Antonin
On 12/4/24 13:19, Antonin Godard wrote:
> On Wed Dec 4, 2024 at 11:44 AM CET, Michael Opdenacker via lists.yoctoproject.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>
>> - Remove duplicate instructions
>>
>> - Detail how to run bmaptool directly if you installed it on your host
>> instead of building it through the ``bmaptool-native`` recipe,
>> as running "oe-run-native bmaptool-native bmaptool ..." won't work
>> in this case.
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>> ---
>> documentation/dev-manual/bmaptool.rst | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
>> index 37083c9c64..93c8d3a45e 100644
>> --- a/documentation/dev-manual/bmaptool.rst
>> +++ b/documentation/dev-manual/bmaptool.rst
>> @@ -43,14 +43,16 @@ any type of image. Use these steps to flash an image using `bmaptool`:
>> depending on your particular setup. The following commands assume the
>> image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
>>
>> - - If you have write access to the media, use this command form::
>> + - If needed, set permissions to get write access to the media::
>>
>> - $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
>> + $ sudo chmod 666 /dev/sdX
> I think you forgot to change to "a+w"
> Also, it wasn't moved after the sudo command?
>
> Looks like the wrong patch may have slipped in? :)
Right, I messed things up by modifying the second commit.
A V3 is coming, thanks!
Michael.
--
Michael Opdenacker
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [docs] [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions
2024-12-04 13:03 ` Michael Opdenacker
@ 2024-12-18 9:35 ` Antonin Godard
2024-12-18 14:49 ` Michael Opdenacker
0 siblings, 1 reply; 8+ messages in thread
From: Antonin Godard @ 2024-12-18 9:35 UTC (permalink / raw)
To: Michael Opdenacker, docs
Hi Michael,
On Wed Dec 4, 2024 at 2:03 PM CET, Michael Opdenacker wrote:
> Hi Antonin
>
> On 12/4/24 13:19, Antonin Godard wrote:
>> On Wed Dec 4, 2024 at 11:44 AM CET, Michael Opdenacker via lists.yoctoproject.org wrote:
>>> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>>
>>> - Remove duplicate instructions
>>>
>>> - Detail how to run bmaptool directly if you installed it on your host
>>> instead of building it through the ``bmaptool-native`` recipe,
>>> as running "oe-run-native bmaptool-native bmaptool ..." won't work
>>> in this case.
>>>
>>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>> ---
>>> documentation/dev-manual/bmaptool.rst | 12 +++++++-----
>>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
>>> index 37083c9c64..93c8d3a45e 100644
>>> --- a/documentation/dev-manual/bmaptool.rst
>>> +++ b/documentation/dev-manual/bmaptool.rst
>>> @@ -43,14 +43,16 @@ any type of image. Use these steps to flash an image using `bmaptool`:
>>> depending on your particular setup. The following commands assume the
>>> image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
>>>
>>> - - If you have write access to the media, use this command form::
>>> + - If needed, set permissions to get write access to the media::
>>>
>>> - $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
>>> + $ sudo chmod 666 /dev/sdX
>> I think you forgot to change to "a+w"
>> Also, it wasn't moved after the sudo command?
>>
>> Looks like the wrong patch may have slipped in? :)
>
>
> Right, I messed things up by modifying the second commit.
> A V3 is coming, thanks!
I did not receive it the v3, not sure you sent it? Just want to check whether
I missed it or not.
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [docs] [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions
2024-12-18 9:35 ` Antonin Godard
@ 2024-12-18 14:49 ` Michael Opdenacker
0 siblings, 0 replies; 8+ messages in thread
From: Michael Opdenacker @ 2024-12-18 14:49 UTC (permalink / raw)
To: Antonin Godard, docs; +Cc: michael.opdenacker
Hi Antonin,
On 12/18/24 10:35, Antonin Godard wrote:
> Hi Michael,
>
> On Wed Dec 4, 2024 at 2:03 PM CET, Michael Opdenacker wrote:
>> Hi Antonin
>>
>> On 12/4/24 13:19, Antonin Godard wrote:
>>> On Wed Dec 4, 2024 at 11:44 AM CET, Michael Opdenacker via lists.yoctoproject.org wrote:
>>>> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>>>
>>>> - Remove duplicate instructions
>>>>
>>>> - Detail how to run bmaptool directly if you installed it on your host
>>>> instead of building it through the ``bmaptool-native`` recipe,
>>>> as running "oe-run-native bmaptool-native bmaptool ..." won't work
>>>> in this case.
>>>>
>>>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>>> ---
>>>> documentation/dev-manual/bmaptool.rst | 12 +++++++-----
>>>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst
>>>> index 37083c9c64..93c8d3a45e 100644
>>>> --- a/documentation/dev-manual/bmaptool.rst
>>>> +++ b/documentation/dev-manual/bmaptool.rst
>>>> @@ -43,14 +43,16 @@ any type of image. Use these steps to flash an image using `bmaptool`:
>>>> depending on your particular setup. The following commands assume the
>>>> image resides in the :term:`Build Directory`'s ``deploy/images/`` area:
>>>>
>>>> - - If you have write access to the media, use this command form::
>>>> + - If needed, set permissions to get write access to the media::
>>>>
>>>> - $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
>>>> + $ sudo chmod 666 /dev/sdX
>>> I think you forgot to change to "a+w"
>>> Also, it wasn't moved after the sudo command?
>>>
>>> Looks like the wrong patch may have slipped in? :)
>>
>> Right, I messed things up by modifying the second commit.
>> A V3 is coming, thanks!
> I did not receive it the v3, not sure you sent it? Just want to check whether
> I missed it or not.
Oops, thanks for the reminder. I believe I had sent it, but indeed, no!
Done now.
Thanks
Michael.
--
Michael Opdenacker
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-18 14:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 10:44 [PATCH v2 0/3] Improvements to "bmaptool" usage documentation michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 1/3] dev-manual: fix styling of references to bmaptool michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 2/3] dev-manual/bmaptool.rst: correct command for bmaptool-native michael.opdenacker
2024-12-04 10:44 ` [PATCH v2 3/3] dev-manual/bmaptool.rst: simplify and fix instructions michael.opdenacker
2024-12-04 12:19 ` [docs] " Antonin Godard
2024-12-04 13:03 ` Michael Opdenacker
2024-12-18 9:35 ` Antonin Godard
2024-12-18 14:49 ` Michael Opdenacker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox