I’m almost sure I’ve already asked something similar, but I can’t find the topic anymore.
Is there a way to configure Torizon OS so that I can put Toradex Easy Installer on an USB pendrive and boot it if I power-on the SoM with the USB plugged in?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To configure your Toradex System on Module (SoM) to automatically boot the Toradex Easy Installer from a USB pendrive, you can follow these steps. This approach allows you to boot the installer without entering recovery mode or downloading it from a PC.
Prepare the USB Pendrive:
Download the Toradex Easy Installer image.
Extract the contents of the Easy Installer package to the root directory of your USB pendrive.
Rename the file boot-tezi.scr to boot.scr. This is necessary because the U-Boot bootloader on Toradex modules looks for a file named boot.scr to execute boot commands.
Ensure Compatibility:
Verify that the versions of the Toradex Easy Installer and the Board Support Package (BSP) on your module are compatible to prevent boot failures.
Boot from USB:
Insert the prepared USB pendrive into the USB port of your carrier board.
Power on the module. The system should attempt to boot from the USB pendrive automatically if the boot order is configured correctly in U-Boot.
If the system does not boot from the USB, you may need to interrupt the boot process by pressing a key during startup to access the U-Boot console and manually execute the command run bootcmd_usb0.
Troubleshooting:
If the boot process fails, check the contents of the boot.scr file to ensure it is correctly configured for your specific module and BSP version.
Adjust the boot script if necessary.
By following these steps, you should be able to boot the Toradex Easy Installer from a USB pendrive, streamlining the process of installing new images on your module.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
This is a difficult thing to achieve since it depends highly on the compatibility between the uboot running on the eMMC and the image found on the USB drive. For example, in a quick test I could get a Verdin iMX8M plus (running reference image 5.7.6) booting the Toradex Easy Installer image 6.6.0 from a USB stick. I followed the steps in this article to stop in uboot and boot the device from USB device. The TEZI image (downloaded here) was unfolded into the root of the USB stick. After it booted into the Easy Installer, I could install an image from the TEZI feeds (from the GUI) into the eMMC. In my quick test, I did everything manually. You will have to modify the uboot environment to boot the module automatically from the USB device.
What is your use-case here? Could you please elaborate?
This is a requirement that come from colleagues of customer service office.
Having the ability of recovery is a must-have (as a last strategy in case of unpredictable issues on site).
For me (a developer, sitting here in my office with my laptop) the “standard” strategy is ok:
I switch the device in recovery mode
I plug USB-C cable
I open command prompt
I run the recovery script
…
But for a service engineer at customer site this is not good (they said so):
he’s a technician (with strong ability in mechanic, electric, …)
he has smartphone, but not a PC
the final product (industrial machine) is in a shopfloor, not on a desktop
to access the switch to enable recovery mode some covers of the machine must be removed
Long story short: the requirement from the service is having a way to recovery plugging a special USB pendrive.
Or another way that doesn’t require an external laptop and can be easily performed at customer site by a technician who is not a programmer.
I understand. In this case, I suppose you are already aware that you will have the device configured to boot always from an external medium (USB stick here). Also, as I mentioned earlier, you will have to ensure the compatibility between the Uboot version running on the device and the image stored in the USB device. I don’t think there is another way to do this without going through the actual recovery process on the device.
I know, and I have several doubts about this.
I’ll talk to colleagues.
But, in any case, how can I have the device configured to boot from USB stick and fallback to eMMC if no blootable image is found on the USB stick?
This is not clear to me
But, in any case, how can I have the device configured to boot from USB stick and fallback to eMMC if no blootable image is found on the USB stick?
This is not clear to me
This is defined in the uboot environment file (u-boot-initial-env-sd) as:
boot_targets=mmc1 mmc2 dhcp
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
Keep in mind that Torizon OS is configured to boot from eMMC by default: bootcmd=run bootcmd_mmc2
You can modify this file to run distro_bootcmd command instead so it will look into the boot targets defined in the order and boot from the first one where it finds a bootable image. Also, you will have to add usb as a boot target in here. By default, usb is not used as a target starting from our BSP 6. I have not tested this on BSP 6. This would be the theoretical way to go forward. You may give it a try.
Once you have modified the uboot environment file, you can build your custom Torizon OS image using TorizonCore Builder.