Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Custom U-Boot Booting from SD Card on Verdin iMX8MP
Based on the available documentation, I can provide guidance on your U-Boot customization requirements for the Verdin iMX8MP.
1. SD Card U-Boot Binary Selection
From your Yocto build output, the correct binary for SD card booting is flash.bin-verdin-imx8mp-sd(1). This is the complete bootloader image that includes both the SPL (Secondary Program Loader) and U-Boot proper, specifically configured for SD card boot mode.
2. Boot Mode Configuration
The Verdin iMX8MP follows standard i.MX8MP boot sequence behavior(2). The SoC’s boot ROM will attempt to boot from different sources based on the boot mode pins and available bootable media. When an SD card with a proper bootloader is inserted, the boot ROM can prioritize it over the internal eMMC.
3. DIP Switch Implementation
The documentation shows that DIP switches can be used to modify boot behavior(3). For the Colibri iMX6ULL example, DIP switches were implemented to change boot processes by reading GPIO values in the board_late_init function(3):
#define DIP_SW0 IMX_GPIO_NR(4, 26)
#define DIP_SW1 IMX_GPIO_NR(4, 14)
(3)
The same concept can be applied to the Verdin iMX8MP, though you would need to identify appropriate GPIO pins from the datasheet(4).
4. U-Boot Environment Variables
The boot process can be controlled through U-Boot environment variables(2). The boot_targets variable defines the sequence of device types U-Boot will try to boot from, in priority order(2). For example:
boot_targets=mmc1 mmc2 dhcp would try SD card (mmc1) before internal eMMC (mmc2)(2)
5. Safe Testing Approach
The recommended approach for testing custom U-Boot safely involves:
-
Using Recovery Mode: The recovery mode can be used to download new software even when the bootloader is no longer capable of booting(5). Enter recovery mode by pulling the dedicated recovery pin (SODIMM pin 246) down with <1kΩ during initial power on(5).
-
SD Card Priority: Place your custom flash.bin-verdin-imx8mp-sd on the SD card’s boot partition. The boot ROM should prioritize the SD card if it contains a valid bootloader.
6. Implementation Steps
- Use the
flash.bin-verdin-imx8mp-sd binary from your Yocto build
- Create a properly formatted SD card with a FAT32 boot partition
- Place the flash.bin file at the correct offset on the SD card
- Ensure no bootable SD card is present when testing recovery mode functionality(5)
7. Yocto Integration
The documentation shows that U-Boot customization can be achieved through Yocto by creating bbappend files and applying patches(6). You can modify kernel parameters and boot behavior through U-Boot configuration files(6).
Note: Always ensure you have access to the recovery mode functionality (SODIMM pin 246) on your carrier board to recover from any boot failures(5).
Best regards,
Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.