AnsweredAssumed Answered

eMMC with multiple partition and SD card mounting issue with i.MX6 Yocto

Question asked by Alankar Dhobale on Jun 13, 2018
Latest reply on Jun 18, 2018 by Alankar Dhobale

We are facing one issue with SD card implementation with i.MX6 series Yocto development. Following is the summary

We are using Yocto Morty (2.2.2) Release BSP 

 

For i.MX6UL (Our own custom hardware), Following is the system storage structure

we have used SDHC1 for SD card and SDHC2 for eMMC.

  1. SD card is probed on mmc0 and eMMC is probed on mmc1
  2. We have 4 partitions on eMMC as follows
    1. Yocto vfat for dtb and kernel (mmcblk1p1)
    2. Yocto ext4 for rootfs (mmcblk1p2)
    3. User ext4 for user application (mmcblk1p3)
    4. User ext4 for user application recovery (mmcblk1p4)
  3. For SD card we generally use with one FAT32 partition for USER data storage, tried with ext4 also

 

Issue definition:

After programming the eMMC first time (using our customised mfgtool to create partition table and download), when we power up the device (SD card not inserted), all the eMMC partitions are getting mounted and seen in the OS properly. After this if power cycle the device with SD card inserted this time, kernel detects the SD card but somehow do not mount any of partitions of eMMC, it still manages to boot kernel and the rootfs, but I don’t see anything mounted in /run/media.

Now if I again power cycle the device with SD card removed, everything works fine again. Same thing happens when I initial power up the device (first OS power up after programming) with SD card inserted. So this time if power cycle the device with SD card removed, it again messes with the eMMC partition.

 

So I get on debugging and found that, udev actually creates cache.data file in /etc/udev at first power up and follows whatever storage structure it finds at first power up, and if udev detects any change in it, it misbehaves. So it has to do something with udev. I read somewhere that udev has some rules on ADD and REMOVE devices, but could not get clear idea.

 

Above same thing happens with i.MX6 Solo processor (Our own custom hardware) also, we use same Yocto build for i.MX6 Solo too... For i.MX6 Solo, we have used SDHC2 for SD card and SDHC4 for eMMC.

 

Can somebody please help...

Outcomes