* BmpTools question
@ 2024-09-18 15:27 Duane Ellis
2024-09-18 15:57 ` [yocto] " Quentin Schulz
0 siblings, 1 reply; 2+ messages in thread
From: Duane Ellis @ 2024-09-18 15:27 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]
Hi – I am following this page:
https://docs.yoctoproject.org/dev-manual/bmaptool.html
And I have some questions about the BMAPTOOL.
As part of a CI/CD process I need to create a disk image [file] I can later write to an USB stick.
I don’t find instructions or examples to do that.
So I tried to figure it out on my own.
I did the following:
step 1:
sudo apt install bmap-tools
Step 2:
Bmap-tool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
Instead of specifying /dev/sdX – I wrote it to a file, ie: “my-image.img”
Step 3 (first try)
I transferred that file to my PC and tried to use RUFUS to write directly to a USB Stick.
Rufus has issues and crashes -> That is a seprate problem.
I will try etcher later today.
Step 3(alternate since that did not work)
I have GITBASH on my windows machine
So running GIT BASH as ADMIN, I tried this:
dd if=my-image.img of=/dev/sdc bs=16384
It writes very quickly with bs=16384, dam slow without “bs=16384”
This image is not bootable ☹
BUT if I write direct to the USB stick from my Virtual machine it works (ie: Map the USB stick to my VM instead of the Windows Host) all I am doing is replacing the FILE with the DEVICE
Questions:
1) is there docs for creating an IMAGE file? (This would be a good addition to that page/link above)
2) Do I need to write to a partition? Ie: /dev/sdc1 instead of the device /dev/sdc
3) Are there any examples of this I can/use follow
4) I did use DD to DUMP the first 4K or so of the disk to a file
Then compared that binary with the first 4K of the IMAGE file I created above
They match perfectly – so I believe the IMAGE file is being written correctly.
Thanks
[-- Attachment #2: Type: text/html, Size: 7595 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [yocto] BmpTools question
2024-09-18 15:27 BmpTools question Duane Ellis
@ 2024-09-18 15:57 ` Quentin Schulz
0 siblings, 0 replies; 2+ messages in thread
From: Quentin Schulz @ 2024-09-18 15:57 UTC (permalink / raw)
To: yocto, duane
Hi,
On 9/18/24 5:27 PM, Duane Ellis via lists.yoctoproject.org wrote:
> You don't often get email from duane=duaneellis.com@lists.yoctoproject.org. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
> Hi – I am following this page:
> https://docs.yoctoproject.org/dev-manual/bmaptool.html
>
> And I have some questions about the BMAPTOOL.
>
> As part of a CI/CD process I need to create a disk image [file] I can later write to an USB stick.
> I don’t find instructions or examples to do that.
> So I tried to figure it out on my own.
>
> I did the following:
>
> step 1:
> sudo apt install bmap-tools
>
> Step 2:
> Bmap-tool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX
>
> Instead of specifying /dev/sdX – I wrote it to a file, ie: “my-image.img”
>
> Step 3 (first try)
> I transferred that file to my PC and tried to use RUFUS to write directly to a USB Stick.
> Rufus has issues and crashes -> That is a seprate problem.
> I will try etcher later today.
>
> Step 3(alternate since that did not work)
> I have GITBASH on my windows machine
> So running GIT BASH as ADMIN, I tried this:
>
> dd if=my-image.img of=/dev/sdc bs=16384
>
> It writes very quickly with bs=16384, dam slow without “bs=16384”
>
> This image is not bootable ☹
>
> BUT if I write direct to the USB stick from my Virtual machine it works (ie: Map the USB stick to my VM instead of the Windows Host) all I am doing is replacing the FILE with the DEVICE
>
> Questions:
>
> 1) is there docs for creating an IMAGE file? (This would be a good addition to that page/link above)
>
> 2) Do I need to write to a partition? Ie: /dev/sdc1 instead of the device /dev/sdc
>
> 3) Are there any examples of this I can/use follow
>
> 4) I did use DD to DUMP the first 4K or so of the disk to a file
> Then compared that binary with the first 4K of the IMAGE file I created above
> They match perfectly – so I believe the IMAGE file is being written correctly.
>
The wic image is the image you need to flash on the USB stick. No
modification required.
dd if=yourimage.wic of=/dev/sdX BS=4M status=progress
and you're good to go. You use the full block device and not a partition.
If you want to use bmap for faster flashing, you need the .wic.bmap
associated with the .wic file (and the .wic file itself). Then
bmaptool copy yourimage.wic /dev/sdX
it'll look for yourimage.wic.bmap and use it to skip flashing empty
blocks (empty blocks != blocks with zeroes).
With etcher, you should use .wic only I believe. It's basically an ISO file.
If dd + .wic doesn't work, it is possible the .wic file isn't created
appropriately, for that you want to check the WKS file that was used to
create the .wic file.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-18 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 15:27 BmpTools question Duane Ellis
2024-09-18 15:57 ` [yocto] " Quentin Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox