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.
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...
Solved! Go to Solution.
Please note that accordingly to eMMC specifications boot partition size is fixed during production.
Its size is defined in EXT_CSD structure of the eMMC.
So please make sure that you does not touch boot partition during updating partitions.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Victor, yes you are correct, i have not touched to the boot partition...
One more observation i have is, after bootup in above case when the eMMC partitions are not mounted by udev, if i delete the chache.data file from /etc/udev and reboot the device, this time at bootup udev creates new cache file and able to mount all the partitions for eMMC and SD card as well. this is something related to udev rules. but still could not get what exactly i need to do to resolve this...
Anybody's help is really appreciated...
Disabling udev cache resolved this issue
thanks