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.

eMMC partitioning from u-boot - I'm talking *eMMC partitions*

Other Parts Discussed in Thread: AM3358, CSD

We're designing a board with an AM3358 SoC and an eMMC for storage. We would like to take advantage of some of the features of the eMMC, like the two boot partitions and the RPMB partition.

Most of the information I can find on, for example, partitioning the eMMC (even from u-boot) is in regards to creating a "normal" partition table in the user data area, but not repartitioning the eMMC itself. So, here are some questions I'm hoping to get answers to:

  1. Does the AM3358 support booting from the eMMC boot partitions, or just from the user data area? The technical reference manual doesn't seem to be using the exact same terms from the JEDEC standard, and "raw mode" doesn't seem to mean "eMMC boot partition mode".
  2. Does u-boot support the first-time programming of the eMMC partitions? Like I mentioned above, it seems like this is just for creating your normal disk partition table. I'm starting to think we'll have to create our own bootstrapping tool.
  3. Are there software tools or existing libraries to help work directly with the eMMC? I realize this isn't a TI specific question...
  • I can try to answer 2 questions.

    1. The AM3358 only supports booting from the usera data area. It will not boot from the boot partitions. You might be able to modify u-boot code such that the boot ROM will load MLO from the user data area and the modified MLO will look for u-boot in a boot partition.

    2. I looked at u-boot and Linux kernel commands late last year or earlier this year so I cannot remember the exact commands. I was able to make a boot partition read-write using u-boot and put some data on it. I just cannot remember what I did. Using the kernel was easier since you made the read-only boot partition read-write using the sysfs file system.

    3. Google search mmc-tools or mmc-utils. I have cross-compiled this in the past and used it to just read information off of the eMMC. I am not sure what other capabilites the tool has. I was reading the ext csd. I believe you can enable bkops and other stuff.

    Steve K.

  • Excellent, thank you for the response.

    On the U-boot User's Guide wiki page, it says the following:

    In some cases it is desirable to write MLO and u-boot.img as raw images to the MMC device rather than in a filesystem. eMMC requires this, for example.

    This is followed by some commands to run. Is it correct to say the results of these operations is the following map of the user area:

    1. MBR exists at address 0x0.
    2. MLO is at 0x100
    3. u-boot.img  is at 0x300.
    4. An ext4 partition is at 0x1000.

    If the above is indeed correct, this seems to conflict with the portion just above (in the u-boot user's guide) that puts a FAT partition as the first partition.

  • Hi Steve,

                   We have very similar requirement here, and were not able to successful in booting from mmcblk1boot0 or mmcblk1boot1.

    In my analysis, I had nearly followed:

    http://lists.denx.de/pipermail/u-boot/2014-February/subject.html#172998

    http://lists.denx.de/pipermail/u-boot/2014-February/172995.html

    but  still, did not achieved it...!!! It would be so glad if you provide me any pointers for the solution

     

    Thanks,

    pratap