PHYTEC
Page 11
To create your bootable SD card, you must first find the correct device name of your SD card and possible partitions. Then unmount the partitions before
you start copying the image to the SD card.
In order to get the correct device name, first remove your SD card and execute
.
ls /dev
Now insert your SD card and execute
again.
ls /dev
Compare the two outputs to find the new device name(s) listed in the second output. These are the device names of the SD card (device and
partitions if the SD card is formatted).
In order to verify the device names found, execute the command
. Within the last lines of its output, you should also find the device names,
dmesg
for example,
(depending on your system).
sde
Now that you have the device name
(e.g.
), you can see the partitions which must be unmounted if the SD card is formatted.
/dev/<your_device>
/dev/sde
In this case, you will also find
with an appended number (e.g.
) in the output. These represent the partition(s) that need to be
/dev/<your_device>
/dev/sde1
unmounted.
Unmount all partitions with:
host$ umount /dev/<your_device><number>
After having unmounted all devices with an appended number (
), you can create your bootable SD card with:
<your_device><number>
host$ sudo dd of=/dev/<your_device> if=phytec-qt5demo-image-phyboard-pollux-imx8mp-1.sdcard bs=1MB conv=fsync
status=progress
If you use the image file created by Bitbake instead:
host$ sudo dd of=/dev/<your_device> if=phytec-qt5demo-image-phyboard-pollux-imx8mp-1-<BUILD-TIME>.sdcard bs=1MB
conv=fsync status=progress
Using the device name (
) without appended number (e.g.
) which stands for the whole device. The parameter
forces a sync
<your_device>
sde
conv=fsync
operation on the device before
returns. This ensures that all blocks are written to the SD card and are not still in memory. The parameter
dd
status=progress
will print out information on how much data is and still has to be copied until it is finished.
has the format:
<BUILD-TIME>
YYYYMMDDHHMMSS
example:
Date = 22.06.2018
Time = 11:06:36
<BUILD-TIME> = 20180622110636
Four Individual Images (
, kernel image, device tree image, root filesystem)
imx-boot
Option two uses
(a kernel and device tree image together with the root filesystem) to create a bootable SD card manually.
u-boot
For this method, a new card must be set up with 2 partitions and 8 MB of free space at the beginning of the card. Use the following procedure with
und
fdisk
er
:
Linux
Create a new FAT partition with partition ID C. When creating the new partition, you must leave 8 MB of free space at the beginning of the card.
When you go through the process of creating a new partition,
lets you specify where the first sector starts. During this process,
will tell
fdisk
fdisk
you where the first sector on the disk begins. For example, if the first sector begins at 1000 and each sector is 512 bytes, then 8 MB / 512 bytes =
16384 sectors. This means your first sector should begin at 17384 to leave 8 MB of free space. The size of the FAT partition needs only be big
enough to hold the Linux kernel Image, which is only a few megabytes. To be safe, we recommend a size of 64 MB.
Create a new
partition with partition id 83. Make sure you start this partition after the last sector of partition 1! By default,
will try to use
Linux
fdisk
the first partition available on the disk, which in this example is 1000. However, this is our reserved space! You must use the remaining portion of
the card for this partition.
Write the new partition to the SD card and exit
.
fdisk
Example:
Type:
Warning
To create your bootable SD card with the
command, you must have root privileges. Because of this, you must be very careful when selecting
dd
the destination device for the
command! All files on the selected destination device will be erased immediately without any further query!
dd
Consequently, having selected the wrong device can also erase your hard drive!