How to boot U-Boot from SD card

Hi,
We are using imx7 Colibri with Iris Carrier board. We want to put everything (u-boot, kernel, dtb, rootfs) in SD card and boot the u-boot and kernel from SD card. For this to happen we have made the changes in the Carrier board as below (as per the Iris Carrier Board datasheet):

  1. In Boot Mode Header (JP1), pins 2&3 are shorted to enter into SD boot mode.
  2. Assembled 100 Ohm resistors R109, R111, R112 and R113 on the Bottom Layer.

With this change, the u-boot is still coming up from NAND flash.
How, to make the u-boot in SD card to come up?

Thanks & Regards
Vijay H.S

Please find your question already answered here noting that the same really applies to the Colibri iMX7 as well.

Hi Marcel,

Thank you very much for the information.

So, if I make a custom board with i.MX7, and make the GPIO settings to select the SD card as the boot device, then will the u-boot come up from SD card?

Also, placing the “u-boot.imx” file in the BOOT partition of SD card is sufficient to boot it?

Thanks & Regards
Vijay H.S

Thank you very much for the information.

You are very welcome.

So, if I make a custom board with i.MX7, and make the GPIO settings to select the SD card as the boot device, then will the u-boot come up from SD card?

I’m not exactly sure what you mean. Do you mean not using our Colibri iMX7 module? I guess then you can do whatever you like.

Also, placing the “u-boot.imx” file in the BOOT partition of SD card is sufficient to boot it?

Unfortunately SD cards don’t have any such BOOT partition. U-Boot would have to be written as raw blocks to a certain offset.

Hi Marcel,

Actually I created a partition (labelled as BOOT) on SD card using Disk Utility on Ubuntu and I made the partition as “Bootable” and copied the u-boot.imx file into the partition.

With this what I assume (I may be wrong here) is that ROM code reads the u-boot.imx file from bootable partition.

Also, I think u-boot.imx file already has the header to inform the offset details.
Is my understanding correct? If not, can you please let me know what all information has to be copied at what offset address on the SD card?

Thanks & Regards
Vijay H.S

Sorry, forgot to mention, the partition (labelled as BOOT) that was created on SD card has FAT32 filesystem.

Actually I created a partition (labelled as BOOT) on SD card using Disk Utility on Ubuntu and I made the partition as “Bootable” and copied the u-boot.imx file into the partition.

With this what I assume (I may be wrong here) is that ROM code reads the u-boot.imx file from bootable partition.

Also, I think u-boot.imx file already has the header to inform the offset details. Is my understanding correct? If not, can you please let me know what all information has to be copied at what offset address on the SD card?

No, any and all your assumptions were wrong. Even if one could boot the Colibri iMX7 via an SD card which one can’t this is definitely not how one would boot an NXP i.MX SoC from an SD card.