i.MX 93 BSP Manual PD24.1.1 Documentation Rev.: imx8mp-pd22.1.2-51-ga548be7d
Selecting the wrong device may result in data loss and e.g. could erase your currently running system
on your host PC!
2.2.1 Finding the Correct Device
To create your bootable SD card, you must rst nd the correct device name of your SD card and possible
partitions. If any partitions of the SD cards are mounted, unmount those before you start copying the image
to the SD card.
1. In order to get the correct device name, remove your SD card and execute:
host:~$ lsblk
2. Now insert your SD card and execute the command again:
host:~$ lsblk
3. Compare the two outputs to nd the new device names listed in the second output. These are the
device names of the SD card (device and partitions if the SD card was formatted).
4. In order to verify the device names being found, execute the command sudo dmesg. Within the last
lines of its output, you should also nd the device names, e.g. /dev/sde or /dev/mmcblk0 (depending
on your system).
Alternatively, you may use a graphical program of your choice, like GNOME Disks or KDE Partition Man-
ager, to nd the correct device.
Now that you have the correct device name, e.g. /dev/sde, you can see the partitions which must be un-
mounted if the SD card is formatted. In this case, you will also nd the device name with an appended
number (e.g. /dev/sde1) in the output. These represent the partitions. Some Linux distributions automati-
cally mount partitions when the device gets plugged in. Before writing, however, these need to be unmounted
to avoid data corruption.
Unmount all those partitions, e.g.:
host:~$ sudo umount /dev/sde1
host:~$ sudo umount /dev/sde2
Now, the SD card is ready to be ashed with an image, using either partup, dd or bmap-tools.
2.2.2 Using bmap-tools
One way to prepare an SD card is using bmap-tools. Yocto automatically creates a block map le
(<IMAGENAME>-<MACHINE>.wic.bmap) for the WIC image that describes the image content and includes check-
sums for data integrity. bmaptool is packaged by various Linux distributions. For Debian-based systems
install it by issuing:
host:~$ sudo apt install bmap-tools
Flash a WIC image to SD card by calling:
host:~$ bmaptool copy phytec-qt6demo-image-phyboard-segin-imx93-2?(.rootfs).wic?(.xz) /dev/<your_
,→device>
Replace <your_device> with your actual SD card’s device name found previously, and make sure to place
the le <IMAGENAME>-<MACHINE>.wic.bmap alongside the regular WIC image le, so bmaptool knows which
blocks to write and which to skip.
Getting Started 8