I have a couple questions regarding booting from eMMC, if anyone could help it would be much appreciated!
1) The custom hardware I'm working with has an eMMC chip connected to MMC0. The TRM implies that eMMC should be connected to MMC1 in 22.214.171.124.2 - "An eMMC/eSD/managed NAND memory device can be connected to MMC1 interface.". Could anyone confirm whether or not it is possible to boot from an eMMC device connected to MMC0?
2) The TRM also states that for eMMC booting you need to use raw mode, as opposed to copying an MLO to a FAT32 partition. Does anyone know if there are any tricks to getting raw mode working? I took my bootloader (which works fine when booting from UART), added an 8 byte header at the beginning containing "00 60 00 00 00 04 2f 40". I also specified in my linker file to place _start at 0x402f0400. I then dd'd the bootloader to offset 0x0 on the eMMC chip. Is there something else I need to do?
By the way I've been able to get QNX running on this target, and have extensively read/written from/to eMMC, so I know the eMMC chip is working OK. But booting just isn't working.
What capacity of eMMC are you using?
Which MMC port you connect with? Try MMC1 instead of MMC0 if your eMMC is larger than 4GB.
I finally got this to work, and I can definitely confirm that booting from an eMMC device (my device size is 2GB) connected to MMC0 works fine, despite what the TRM says.
I had to prepend a header to my bootloader (i.e. _before_ the 8 byte GP header). I found the eMMC header at this link [http://processors.wiki.ti.com/index.php/AM335x_Android_eMMC_booting#u-boot_build] I've also attached the file in case the link ever goes dead.
I then used fdisk to format my eMMC device. I created a FAT32 partition at the 1MB offset so that I can store kernel, user files, etc. in the FAT32 partition. Now I wanted to dd my new bootloader to offset 0x0 of the eMMC, but I was afraid this would clobber the MBR, so I instead dd'd to the next allowable offset - the 128KB offset.
dd if=/tmp/bootloader-filename of=/dev/hd0 bs=1k seek=128
I then reset the system and BAM, the bootloader text appeared on the console!
Would you mind tell me which board you are using to boot from eMMC(MMC0 as an inteface), thanks in advance!
Looks like you were bitten by the same CHSETTINGS bug that bit us when we were trying to boot from NAND flash. We spent a lot of time trying to get booting from NAND working. There is some info about the CHSETTINGS header here:
Thanks a lot for the link! That's the first TOC documentation that I've seen for the am335x.
I really hope TI can get this into the next TRM!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.