Yavia recovery mode without computer

Hello everyone,

I am reaching out today because I have a question that I can’t seem to answer regarding my Yavia dev board and Verdin IMX8M Plus cards.

I wanted to know if there is a way to put the dev board into recovery mode without using a PC.
I can flash my cards via the .sh script, but I would like to have a standalone station without having to use a computer for every flash.

I have a USB key with my image that installs correctly when TEZI is installed (on a new card, or an erased card), but if I need to reflash an existing card, I would like not to have to use the PC to load TEZI and enter recovery mode.

I saw here that you can use an SD card (and that it is not officially supported: Loading Toradex Easy Installer | Toradex Developer Center) and that it would take precedence over eMMC, but I can’t get it to work. I used a 16GB SD formatted with a GUID partition table on FAT32 with the TEZI files at the root of the SD.
But the card boots from the eMMC and does not enter recovery. I think I’m missing some information because I am not very familiar with the Toradex environment (I used to work with Raspberry Pi before ^^)

Thank you in advance for your help.
Tewfik

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Tewfik,

Entering recovery mode without a PC on the Yavia development board with Verdin iMX8M Plus modules requires a method to trigger the board’s hardware into this specific mode. Typically, recovery mode is initiated through a hardware mechanism that signals the processor to boot from an alternative source, such as USB for loading firmware directly into RAM, which is why a PC is commonly used for this purpose.

For a standalone flashing station without a PC, the approach you mentioned about using an SD card with the Toradex Easy Installer (TEZI) could be a viable solution, albeit with some limitations and considerations. However, based on your description, it seems there might be a misunderstanding or a step missed in the process.

The primary method to enter recovery mode and flash a module typically involves using a PC to run a script that puts the device into recovery mode, allowing TEZI to load and then flash the image from an external medium like a USB drive or an SD card. Without a PC, automatically entering recovery mode to reflash from an SD card or USB drive without manual intervention each time is challenging and not directly supported as a standard procedure for Verdin modules.

The behavior you’re experiencing, where the board boots from eMMC instead of the SD card, indicates that the module is not in recovery mode and thus is booting from its primary storage. The method involving an SD card you referred to generally applies to loading TEZI onto a module already in recovery mode or for modules that support booting directly from an SD card, which might not directly apply to your scenario with the Yavia development board.

For a truly PC-less update mechanism, one alternative approach could be to implement a custom solution that triggers the recovery mode through hardware (like a button press sequence that signals the processor to enter recovery mode) or software (an application running on the module that reboots it into recovery mode). However, this would require custom development and a deep understanding of the module’s boot process and capabilities.

Given the constraints of the current setup and the need for a PC to initiate recovery mode, a fully standalone flashing station might not be feasible without significant custom development or adjustments to the standard process.

For now, the most straightforward method to reflash Verdin modules without manual intervention remains using a PC to enter recovery mode and then flash the image from an external medium like a USB drive or an SD card through TEZI.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

NXP i.MX and TI AM62x Recovery Mode | Toradex Developer Center.

Hello

Thank you for this response. Actually, I can press the button to enter recovery mode, but I don’t want to use a PC with an external script because I cannot leave a computer in this space.

I wish to enter recovery mode without running a bash script (and thus using uuu) but only via the board.

My image is set to auto-install, so the process I’m looking for is to install a Verdin card, plug it in, press the recovery button, and install the image on the card.

I’m not sure if this is very clear, and I apologize in advance as I am not a native English speaker :slight_smile:

Hello @Tewfik,

For this purpose, recovery mode is not needed.
You can achieve this by using a single FAT32 partition on an SD card with a GPT partition table.

In this partition you can copy the Toradex Easy Installer files and the folder with your custom image which is configured to auto-install.
This way when the device is turned on, it will boot to Toradex Easy Installer and the image will be auto-installed.

Here is an example of how this can be organized:

$ lsblk -l -o NAME,FSTYPE,SIZE,TYPE -d /dev/mmcblk0*
NAME      FSTYPE  SIZE TYPE
mmcblk0          14,8G disk
mmcblk0p1 vfat   14,8G part
$ tree 
.
├── boot.scr
├── image.json
├── imx-boot-recoverytezi
├── imx-boot-sd
├── overlays.txt
├── recovery
│   ├── uuu
│   ├── uuu.auto
│   └── uuu.exe
├── recovery-linux.sh
├── recovery-windows.bat
├── recovery-windows.README
├── tezi.itb
├── tezi.png
├── Verdin-iMX8MM_Reference-Multimedia-Image-Tezi_6.6.0+build.12
│   ├── image.json
│   ├── imx-boot
│   ├── LA_OPT_NXP_SW.html
│   ├── marketing.tar
│   ├── prepare.sh
│   ├── Reference-Multimedia-Image-verdin-imx8mm.bootfs.tar.xz
│   ├── Reference-Multimedia-Image-verdin-imx8mm.tar.xz
│   ├── toradexlinux.png
│   ├── u-boot-initial-env-sd
│   └── wrapup.sh
└── wrapup.sh

3 directories, 24 files

Please let us know if you have any problems getting this setup.

Best Regards,
Bruno

Hi @bruno.tx
this possibility is really nice, but it’s not clear to me.
Here is what I understood:

  1. format a SD card with FAT32 partition on GPT partition table (I used diskpart under Windows)
  2. download TEZI and copy the files inside the SD card
  3. copy the folder with my custom image inside the SD card. What do you mean with the sentence “which is configured to auto-install”?

I power-up my SoM in recovery mode, but nothing happens.
Can you clarify what I should do?
Thanks

Hello everyone

I have the same issue. I tried to follow your steps but the Yavia does not boot on tezi.
If i start the recovery mode by the script it works.

Maybe we missed a step ?

Regards.

Hello @Tewfik and @vix,

To clarify this topic, recovery mode should not be used when booting the Toradex Easy Installer from an SD card.

This method relies on the bootloader installed to the eMMC of the SoM.
The default bootloader is configured to try to boot from the SD card first, so it should boot directly to the Toradex Easy Installer if the bootloader does not have this disabled or configured differently.


You can configure an image to be auto-installed by Toradex Easy Installer by setting a value on the image.json file.
The recommended way to set this up if you are using Torizon is to configure this on the tcbuild.yaml file on TorizonCore Builder. The relevant settings are commented in the template under output -> easy-installer -> local.


Just to confirm, are you powering up the module in recovery mode?
If so, please try to power it up normally.

Best Regards,
Bruno

On my Yavia, it doesn’t boot from SD card.
The OS installed on the eMMC boot instead.
Do you know why?

/* EDIT */
I don’t know if this helps, but in my case I have a Verdin iMX8M-Plus

Hey

I have the same issue.
I’m not using the recovery mode but it doesn’t boot on tezi but in the os on the SOM instead.

It weird i’ve tried on few Yavias board.

regards

Maybe is not the defakt behavior because i tried to put only the tezi files on my SD but it seems not boot on the SD.

Do we have a way to verifiy the boot order ?

Hello @Tewfik and @vix,

I have tested this method using a Verdin iMX8MP in a Yavia Carrier Board and it works.
What you have to keep in mind is that it relies on the version of the bootloader present in the SoM’s eMMC, so not all versions of the Toradex Easy Installer will work, depending on the version of u-boot.

If you have a BSP 6/Torizon OS 6 image installed to the SoM, you should use the latest version of the Toradex Easy Installer, version 6.6.0.


If you are already using a matched version of the Toradex Easy Installer, can you connect to the SoM’s serial port (via J5) and stop at u-boot.
This can be done by power-cycling the board and immediately pressing “enter” many times on the serial port window.
After this, you should be in a u-boot “shell”.

In u-boot, can you then run the following command?

run bootcmd_mmc1

This should make u-boot try to boot to the microSD card.
Please save the output and send them here so I can check what may be wrong.

Best Regards,
Bruno

I attach two log files:

  • run_from_uboot.log (6.7 KB) this is the log when I run run bootcmd_mmc1 from u-boot shell
  • normal_boot.log (3.2 KB) is the log of the normal boot (whenh the same SD card is inserted)

The key difference is this one:
When I run from u-boot shell I see

Verdin iMX8MP # run bootcmd_mmc1
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr

In the normal boot I see

switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1...
Found U-Boot script /boot.scr

so
mmc1 is current device vs mmc2 is current device

/* EDIT */
So I looked into Torizon OS 6.6.1+build.14 (file u-boot-initial-env-sd) and I found
bootcmd=run bootcmd_mmc2
but it should be
bootcmd=run bootcmd_mmc1
to match what you asked us to do from the u-boot shell.

But if I change into
bootcmd=run bootcmd_mmc1
and I boot without any SD card inserted, I got the error
MMC: no card present
and the boot cannot be completed.

Does this help you @bruno.tx?

Hello @vix,

Thanks for giving me this information.

It turns out that this is not the default configuration for the Torizon OS bootloader, as bootcmd is set to automatically boot from the eMMC.
This can be changed by setting bootcmd to run distro_bootcmd, as is the default configuration for the Toradex Easy Installer and the Toradex Reference Multimedia Image.

Therefore, if you are using Torizon OS, the option I outlined will only be possible if you change this variable on u-boot for the original image.
This can be done by changing bootcmd in u-boot-initial-env-sd before installing the original image.

I apologize for the confusion.

@Tewfik, do you also have Torizon OS installed?
I believe the problem is exactly the same here.

Best Regards,
Bruno

Do you mean changing
bootcmd=run bootcmd_mmc2
to
bootcmd=distro_bootcmd (without the run)?

I think so, since I see
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done

One more question:
since I had changed
bootcmd=run m4boot; run bootcmd_mmc2
to have cortex-M started by u-boot, I would need
bootcmd=run m4boot; distro_bootcmd
Can you confirm, please?

Hello @vix,

Sorry for the confusion. you need to use bootcmd=run distro_bootcmd
I have corrected my previous post.

When using the Cortex-M, you will need to use bootcmd=run m4boot;run distro_bootcmd.

Best Regards,
Bruno

Are you 100% sure?
The expansion of distro_bootcmd contains a series of run bootcmd_${target}.
So, is there another run necessary to execute the expansion?

Hello @vix,

@bruno.tx will be out of office this week. So I took over this case and had a look at the conversation.

The expansion of distro_bootcmd contains a series of run bootcmd_${target} .
So, is there another run necessary to execute the expansion?

Yes, you need this additional run to ensure the commands are properly executed. The distro_bootcmd itself is designed to iterate through the targets, but the run command needs to properly trigger this iteration.