HI, All,
Anyone can help me?
imx6_andriod8.0_source_code_1\device\fsl\common\tools\fsl-sdcard-partition.sh had bug.can't burn sdcard.
After flash uboot(u-boot-imx6q.imx) GPT had been destroy.
function make_partition
{
if [ ${card_size} -gt 0 ]; then
partition_file="partition-table-${card_size}GB.img"
fi
#${node}=/dev/sdb,vaild_gpt_size=17
echo "make gpt partition for android: ${partition_file} node=${node}"
dd if=${partition_file} of=${node} bs=1k count=${vaild_gpt_size} conv=fsync
}
function flash_android
{
if [ "${flash_images}" -eq "1" ]; then
bootloader_file="u-boot-${soc_name}.imx"
flash_partition boot
flash_partition recovery
simg2img ${systemimage_file} ${systemimage_raw_file}
flash_partition system
rm ${systemimage_raw_file}
simg2img ${vendor_file} ${vendor_raw_file}
flash_partition vendor
rm ${vendor_raw_file}
flash_partition vbmeta
echo "erase_partition: uboot : node=${node}"
echo "flash_partition: ${bootloader_file} ---> ${node}"
first_partition_offset=`gdisk -l ${node} | grep ' 1 ' | awk '{print $2}'`
# the unit of first_partition_offset is sector size which is 512 Byte.
count_bootloader=`expr ${first_partition_offset} / 2 - ${bootloader_offset}`
echo "the bootloader partition size: ${count_bootloader}"
#bootloader_offset=1, count_bootloader=8191,${node}=/dev/sdb
#as follows command destroy GPT .
dd if=/dev/zero of=${node} bs=1k seek=${bootloader_offset} conv=fsync count=${count_bootloader}
dd if=${bootloader_file} of=${node} bs=1k seek=${bootloader_offset} conv=fsync
fi
}
related question:
Android8 Filesystem not Mounted(To boot from the SD card) (
)
Regards,
crr6
Solved! Go to Solution.
Hi, Diego.
I using follow command:
sudo ../../../../device/fsl/common/tools/fsl-sdcard-partition.sh -f imx6q -c 14 /dev/sdb.
now i use mfg tool to flash emmc. Don't need it now.
Thank you.
Best Regards,
Crl6.
Hello,
I apologize for the late answer.
Can you please tell me how are you using the fsl-sdcard-partition.sh scrip?
Best Regards,
Diego.
Hi, Diego.
I using follow command:
sudo ../../../../device/fsl/common/tools/fsl-sdcard-partition.sh -f imx6q -c 14 /dev/sdb.
now i use mfg tool to flash emmc. Don't need it now.
Thank you.
Best Regards,
Crl6.