Image Deployment#
This section describes how to deploy the downloaded or created images to the target device. At the first step, the image is written to an SD card. Subsequently, the image can be copied to the internal eMMC.
SD Card Image#
To write a Linux image to an SD card, you will need an empty SD Card with 64 GB of space.
To boot into the SD card image, press the Alternative Boot Button while powering up the device.
In native Ubuntu, we can both unpack and write the zip archive in a single terminal command. Replace <IMAGE NAME> with the filename of the image you downloaded in the previous step. Use ls /dev/sd* to list all of your drives and be careful whenever you work with storage devices. Instead of sdX, enter the name of the SD card device. Ensure that the package zstd is installed on your system.
# Install zstd if not present.
# e.g. sudo apt update; sudo apt install zstd
sudo umount /dev/sdX*
zstdcat <IMAGE NAME> | sudo dd of=/dev/sdX bs=1M status=progress; sync
In Windows, we recommend using the open-source tool Rufus to write the image file to the SD card.
With Rufus, .wic.zst images can be directly flashed to the SD card. Download the app here: rufus.ie
Internal eMMC storage#
To write the image to the internal eMMC storage, boot into the SD card as described before. Then copy the bootloader and the root filesystem to the eMMC (/dev/mmcblk2).
Flashing the bootloader#
To flash the bootloader, issue the following command in user space. The boot device (/dev/mmcblk2boot0) is selected by pressing the space bar.
cl-uboot
Copying the root filesystem#
To copy the root filesystem, issue the following command. The storage device (/dev/mmcblk2) is selected by pressing the space bar.
cl-deploy
In case of upgrading from Yocto 4.0 (Kirkstone) to 5.0 (Scarthgap)#
When upgrading from Yocto 4.0 (Kirkstone) to 5.0 (Scarthgap), the bootloader environment must be reset once by following those instructions.
Establish a serial connection to the Console I/O Port.
Boot up the device into the eMMC by leaving the Alternative Boot Button unpressed, and interrupt the boot process by hitting any key to stop autoboot on the serial terminal.
Execute the following commands in the U-Boot terminal (
ucm-imx8m-plus=>)
# reset u-boot environment
env default -a
# save u-boot environment
saveenv
# reboot
reset