Hi,
On 9/18/24 5:27 PM, Duane Ellis via lists.yoctoproject.org wrote:
You don't often get email from duane=duaneellis....@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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63863): https://lists.yoctoproject.org/g/yocto/message/63863
Mute This Topic: https://lists.yoctoproject.org/mt/108522168/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-