Zbigniew Mazur

Booting Android 8 NXP BSP from sdcard on iMX6

Discussion created by Zbigniew Mazur on Mar 22, 2018
Latest reply on Aug 13, 2018 by ByeongHeon YOO

I would like to welcome everyone here as this is my first post here. Good evening!

 

I wanted to say a bit about running Android 8 NXP BSP on processors i.MX6 from sdcards.

 

Android 8 linux kernel uses Guid Partition table GUID Partition Table - Wikipedia  but

iMX processor starts uboot from 1024 byte of sdcard. So when you put uboot to 1024byte you just destroyed Entires 1,2 etc.. records. So NXP Android Guide asks us to use script "device/fsl/common/fsl-sdcard-parition.sh" that before destroying primary GPT creates secondary(backup) partition table in reverse order at the end of sdcard (like wikipedia article describes). But because you write sdcard image from the 'front' and sdcard's are different size there is no way to create sdcard.img that you can flash on many different sdcards. - you wont write backup GPT in right sectoros if size change.

 

Additionally this script is problematic because if you create many different sdcards, linux cashes and doesn't write and sync somehow doesn't help. Restart sometime is needed, when you see a system.img written in 3 seconds then it's wrong.

 

Userdata.img and Cache.img are not generated during android make build, but during this script using mkfs.ext4 which throws errors and don't create those images sometimes after multiple cards has been flashed. PC Reboot is needed too.

Outcomes