This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Questions regarding booting from eMMC

Hi all,

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 26.1.7.5.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.

Thanks,

Mark

  • Mark,

     

    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.

     

    Best Regrad,

    Rich

  • Hi all,

    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!

    Mark

    5483.EMMC_raw_header.dat

  • Hi Mark,

    Would you mind tell me which board you are using to boot from eMMC(MMC0 as an inteface), thanks in advance!

    Regards,

    Zumeng

  • 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:

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/791/t/207888.aspx

  • Hi Frank,

    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!

    Mark

  • Mark,
    Certainly a late reply/question regarding this same topic.. I think I am doing almost the exact thing you did.. I can boot with an image in UART mode, and now i need to transfer that image to boot raw, but in my case I need to boot off the uSD card on the BBB (AM335x). I prepend the TOC header and GP header to my image and then I've tried locating it at offset 0 & 0x20000 but its just not booting. Is there any difference regarding the header format for booting off uSD instead of eMMC?