AnsweredAssumed Answered

i.MX6Q Failure To Boot From eMMC on Custom Board

Question asked by C Brust on Feb 15, 2016
Latest reply on Feb 17, 2016 by C Brust

We have a custom board based largely upon the i.MX6Q SabreAI reference design with the addition of eMMC (like SabreSD).  We've configured and built a custom U-Boot and Linux using the Yocto FSL Community BSP v3.14.28 release.  During our development, u-boot has been successfully loaded and executed manually with the DTB, Linux kernel and RootFS on a TFTP server.  Everything boots up and runs flawlessly this way so we know that our U-Boot and Linux are good.  The problem is that we cannot get U-Boot to start when it is loaded into the eMMC on our custom board. 


We've verified required settings (provided below) but U-Boot does not start upon power on (or reset) and after about 30 seconds the i.MX6Q reverts to serial download mode as expected upon a boot failure. I've also attempted to use the MFGTool but again without success. Since we have a booting/running Linux via TFTP we have placed U-Boot manually into eMMC. The details of this are below.  We've been successful placing and executing U-Boot/Linux with this same process on the SabreSD eMMC.   To Linux, our eMMC devices appear as /dev/mmcblk2, /dev/mmcblk2boot0, etc. This process has been verified as successful in placing u-boot into the boot 0 partition.


Here's our procedure to load U-Boot from Linux.

-- Enable read/write for boot region

     $ echo 0 > /sys/block/mmcblk2boot0/force_ro

-- Zero out the boot region as a precaution

     $ dd if=/dev/zero of=/dev/mmcblk2boot0

     $ sync

-- Copy U-Boot onto the boot partition

     $ dd if=u-boot.imx of=/dev/mmcblk2boot0 bs=512 seek=2

     $ sync

-- Make it "bootable"

     $ echo 8 > /sys/devices/platform/.../mmc2/mmc2:0001/boot_config


Here are the details of the custom board registers after U-Boot comes up for reference.

After power on, the SRC_SBMR# registers have the following values shown & I've decoded the most relevant values.

SRC_SBMR1 = 0x0000 D062 (b 00000000 00000000 11010000 01100010)

SRC_SBMR2 = 0x2A00 0001 (b 00101010 00000000 00000000 00000001)

These  registers indicate:

BMOD[1:0] = 10             <- Internal Boot

BT_SEL_FUSE = 0         <- Bits of SBMR are overridden by GPIO pins

DIR_BT_DIS = 0             <- Direct Boot from External Memory is Allowed

SEC_CONFIG[1] = 01     <- Open - allows any code to be flashed/executed


BOOT_CFG1[7:5] = 011 <- Boot from eMMC

BOOT_CFG1[4] = 0        <- Regular Boot (not Fast Boot)

BOOT_CFG1[3] = 0        <- SD/MMC Speed = High (not Normal)

BOOT_CFG1[2:0] = 010 <- These bits are reserved


BOOT_CFG2[7:5] = 110 <- 8-bit DDR (MMC 4.4)

BOOT_CFG2[4:3] = 10   <- uSDHC3 port selected

BOOT_CFG2[2] = 0        <- Boot ROM default (DLL override)

BOOT_CFG2[1] = 0        <- Boot Ack Enabled (Fast Boot Acknowledge Disable)


At this point we believe have verified all settings as correct and cannot explain why U-Boot will not start from eMMC.  Based upon the above settings, the i.MX6Q is apparently trying to boot from eMMC but failing. We can tell this because serial download mode appears after about 30 seconds have elapsed. Interesting to note is that if U-Boot is loaded and executed via another means, we can actually boot and run Linux out of the custom board eMMC.  Only U-Boot is unable to start.


One, possibly important difference is that our custom board uses a Samsung 64GB eMMC version 5.0 chip (supposed to be backward compatible to v 4.4).  I do not think this is an issue but I add it here in case it is relevant.


Any insight on where to look or what to try would be greatly appreciated as we are at a standstill on this issue.  Maybe there's an alternative to placing U-Boot in the boot0 partition if this cannot be made to work?

Thanks in advance.