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 partition alignment

Other Parts Discussed in Thread: DM3730

Hi all,

is there any constraint on heads and sectors/track for bootable eMMC partitioning and formatting?

Using 255 heads and 63 sectors/track I can succesfully boot my DM3730 system; the boot partition (containing MLO and u-boot) looks like this:

# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 3959 MB, 3959422976 bytes
255 heads, 63 sectors/track, 481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1   *           1           5       40131   b Win95 FAT32

or in sector units:

# fdisk -ul /dev/mmcblk0

Disk /dev/mmcblk0: 3959 MB, 3959422976 bytes
255 heads, 63 sectors/track, 481 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1   *          63       80324       40131   b Win95 FAT32


For better eMMC performance I would like to align partitions to multiple of erase group size (in my case 256 Kb).

To get 256 Kb cylinder I used 16 heads and 32 sectors/track and boot partition looks like this:

# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 3959 MB, 3959422976 bytes
16 heads, 32 sectors/track, 15104 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1   *           2         129       32768   b Win95 FAT32

or in sectors units:

#fdisk -lu /dev/mmcblk0

Disk /dev/mmcblk0: 3959 MB, 3959422976 bytes
16 heads, 32 sectors/track, 15104 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1   *         512       66047       32768   b Win95 FAT32

But now system boot fails (no X-Loader output in the console).

Any suggestion?

Regards,

Andrea

  • Hi Andrea,

    I think the issue is caused by the MBR written in the first sector. If we analyze the difference between the MBR in both the partition types you'll be able to figure out. 

    You've mentioned that "For better eMMC performance I would like to align partitions to multiple of erase group size (in my case 256 Kb)."? Since MMC/SD doesn't need a erase before doing a write, how is it going to help you? The actual erase/write happens inside the controller inside the card. 

    What is the performance that you are targeting? We've done some work on performance improvement for NAND and eMMC in different platforms.

    -Renjith

    www.pathpartnertech.com

  • Hi Andrea,

    We are also using emmc 3.6GB card,

    getting detected in kernel,

    when i'm doing only single partition, but after mounting

    size showing by giving df -h command;

    only 2.0G showing , what might be the problem?

    root@beagleboard:~# ./fdisk /dev/mmcblk0

    The number of cylinders for this disk is set to 14752.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)

    Command (m for help): p

    Disk /dev/mmcblk0: 3867 MB, 3867148288 bytes
    16 heads, 32 sectors/track, 14752 cylinders
    Units = cylinders of 512 * 512 = 262144 bytes

            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1               1       14752     3776496  83 Linux

    Command (m for help):

    please help, me in partitioning the emmc only 1 partition?

    Regards,

    santosh vastrad