Jump to content

Flashing the Board

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page





After a successful build, you should see multiple files in:

 
build/deploy/images/verdin-imx95/

Among them, the most relevant files for deployment and usage are the following:

Toradex Easy Installer Image (Recommended for eMMC Flashing)

  • Verdin-iMX95_Reference-Minimal-Image-Tezi_<version>.tar
  • Verdin-iMX95_Reference-Minimal-Image-Tezi.tar

This is the image used with Toradex Easy Installer (TEZI). Toradex Easy Installer is the recommended method for flashing operating system images to the internal flash memory (eMMC) of Toradex modules.

To learn how to install this image using Toradex Easy Installer, refer to the following guide:

Offline installation of a pre-built image using GUI

SD Card Image

This method is discouraged
  • Verdin-iMX95_Reference-Minimal-Image.wic.gz
  • Verdin-iMX95_Reference-Minimal-Image.wic.bmap

The OpenEmbedded build system generates wic images that can be written directly to an SD card. These images already contain the partition layout, kernel, device tree, and root filesystem required for booting the system.

The image is compressed as a .wic.gz file and can be written directly to the SD card using the dd utility.

Flashing the SD Card image

Connect the SD card to the host system and identify the device name using:

lsblk

The output will look as follows.

sdba           8:16   1  58.2G  0 disk 
├─sda1        8:17   1   256M  0 part /media/carguedas/boot
└─sda2        8:18   1     2G  0 part /media/carguedas/root

If the SD card structure differs from the expected layout, please format the SD card as follows.

1. Unmount any existing partitions:

sudo umount /dev/sda1
sudo umount /dev/sda2

2. Recreate the partition table from scratch:

sudo fdisk /dev/sda

3. Follow these steps inside fdisk:

Welcome to fdisk (util-linux 2.39.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): o
Created a new DOS (MBR) disklabel with disk identifier 0x51cde645.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-124669951, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-124669951, default 124669951):

Created a new partition 1 of type 'Linux' and of size 59.4 GiB.

Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

4. (Optional) Create the FAT32 filesystem if needed:

sudo mkfs.vfat -F 32 -n TEZI /dev/sda1

After this process, the SD card should be ready to be flashed correctly.

Once the correct device is identified, write the image to the SD card using:

gunzip -c Reference-Minimal-Image-verdin-imx95.rootfs.wic.gz | sudo dd of=/dev/sda bs=4M conv=fsync status=progress

Replace /dev/sda with the correct device corresponding to your SD card.

This command decompresses the .wic.gz image and writes it directly to the SD card in a single step.

The output should look similar to the following:

467894272 bytes (468 MB, 446 MiB) copied, 2 s, 234 MB/s
685395968 bytes (685 MB, 654 MiB) copied, 2.69174 s, 255 MB/s

0+20908 records in
0+20908 records out
685395968 bytes (685 MB, 654 MiB) copied, 48.5262 s, 14.1 MB/s

After the process finishes, remove the SD card safely, insert it into the Verdin Development Board, and power on the system. The module will boot directly from the SD card using the image written to it.

Verifying the Boot Order in U-Boot

In some situations, the board may not automatically boot from the SD card depending on the configured boot order. You can verify the boot order directly from the U-Boot console.

Power on the board and interrupt the boot process by pressing any key when the following message appears:

Hit any key to stop autoboot

Once the U-Boot prompt appears, run the following command:

printenv boot_targets

The output should list the boot devices in order of priority. For example:

boot_targets=mmc1 mmc0 usb0 dhcp

Where:

  • mmc1 corresponds to the SD card
  • mmc0 corresponds to the eMMC

To boot from the SD card first, ensure that mmc1 appears before mmc0 in the boot_targets variable.





Cookies help us deliver our services. By using our services, you agree to our use of cookies.