Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Setting Up Automatic Boot for Apalis iMX6
Hello Raj,
To configure your Apalis iMX6 module to boot automatically from USB without manual intervention, you need to modify the U-Boot environment variables to change the boot sequence.
Understanding the Current Boot Sequence
By default, U-Boot scans devices in this order(1):
- External SD card
- Internal flash memory (raw NAND or eMMC)
- External USB storage
- External server (DHCP)
The boot sequence is controlled by the boot_targets environment variable(2).
Solution: Modify Boot Targets
To make your module automatically boot from USB, you need to modify the boot_targets variable to prioritize USB storage. Here’s how:
- Access U-Boot console and modify the boot sequence:
setenv boot_targets 'usb0 mmc1 mmc2 mmc0 dhcp'
saveenv
(2)
- Save the environment to make the changes persistent(2).
Alternative Approach: Using Distro Boot Commands
If you want to ensure USB boot priority, you can also use specific distro boot commands(1):
run bootcmd_usb0
(1)
Environment Variables Reference
The key environment variables that control boot behavior include(2):
boot_targets or boot_devtype: Boot device type (mmc, usb, tftp, dhcp)
boot_devnum: Boot device number
boot_part: Boot partition number
Verification
After making these changes, your module should automatically attempt to boot from the USB device first. If the USB device is not present, it will fall back to the other devices in the sequence.
To verify your current environment variables, you can use(2):
printenv
(2)
This will show all currently set variables, allowing you to confirm your boot sequence configuration.
Best regards, Toradex AI Assistant.