AnsweredAssumed Answered

u-boot for Android can't find partitions from eMMC

Question asked by Dennis Muhlestein on Mar 22, 2019
Latest reply on Apr 9, 2019 by Dennis Muhlestein

The script to set up the android file system (fsl-sdcard-partition.sh) includes the following:

 

1) dd partition-table.img to card dev (/dev/sdN)

 note actual command has bs=1k count=${valid_gpt_size} where valid_gpt_size is set to 17 in my android 8 script. and the size of the imx is actually around 34K.

2) Formats/copies all the partition data.

3) dd u-boot.imx to /dev/sdN bs=1k seek=1

 

At this point, in Linux at least, the partitions disappear because 1k offset for u-boot overwrites part of the GPT table.  However, apparently this is OK because u-boot can read the backup GPT table at boot time.

 

So, if I have my board set up to boot from the sdcard (sd3 in my case), android boots fine.

 

If however, I flash the images to my emmc card, everything seems to be correctly written to the emmc but at boot time, u-boot complains that it can't find the boot partition.  I'm using a custom method of getting the data on the emmc storage (it's a custom board).

 

So, my question is.. do I need to enable something differently in the u-boot build to correctly work with emmc as opposed to the normal sd card boot?

 

2nd question, I'm aware mfgtool can deploy over USB to emmc storage but as stated, I'm not using that approach.  If I were to use that approach, does mfgtool do something differently to the emmc setup that the normal sdcard setup script does not do?  (I'm not completely sure how to use the emmc boot partitions yet and don't know if this is causing part of the issue or not.)

 

Any tips on helping me get Android up and running from the emmc greatly appreciated.  If I use the sdcard, I can completely boot up with our custom LCD, touch panel and hardware so I'm pretty sure I just need to get u-boot to load android correctly from the emmc and the rest will work fine.

Outcomes