Hi,
We are using eMMC (4GB) connected on MMC0 port of AM3356.
SDK version : ti-processor-sdk-linux-am335x-evm-01.00.00.00 and Kernel : 3.14.26.
I am using following link for flashing eMMC for two partition.
http://processors.wiki.ti.com/index.php/Sitara_Uniflash_Flash_Programming_with_Linux
It was flashing properly and working fine with two partitions on MMC0 port.
Now I have changed script to make 9 partitions (custom requirement) and copied every thing in place (MLO, UBOOT , KERNEL and dtb files to boot partition (1st partition)).
But when I try to boot from eMMC it shows CCCCCC means RBL could not find MLO. Although MLO is copied to BOOT partition and it was verified multiple times. (eMMC is connected on same MMC0 port.)
My assumption is that MBR is not created properly, so that it can not find MLO from partition.
I am using following script to make partition, please find the commands :
device="/dev/mmcblk0"
dd if=/dev/zero of=$device bs=1024 count=1024
# get the partition information.
total_size=`fdisk -l $device | grep Disk | awk '{print $5}'`
total_cyln=`echo $total_size/255/63/512 | bc`
# start of BOOT partition
pc1_start=63
pc1_end=9
# start of ROOTFS partition
pc2_start=$(($pc1_start + $pc1_end))
pc2_end=50
# start of BOOT_BACKUP partition
pc3_start=$(($pc2_start + pc2_end))
pc3_end=10
# start of ROOTFS_BACKUP partition
pc4_start=$(($pc3_start + $pc3_end))
pc4_end=50
# start of CONFIG partition
pc5_start=$(($pc4_start + pc4_end))
pc5_end=3
# start of CONFIG_BACKUP partition
pc6_start=$(($pc5_start + pc5_end))
pc6_end=3
# start of LOG partition
pc7_start=$(($pc6_start + pc6_end))
pc7_end=10
# start of DATA partition
pc8_start=$(($pc7_start + pc7_end))
sfdisk -D -H 255 -S 63 -C $total_cyln $device << EOF
$pc1_start,$pc1_end,0x0C,*
$pc2_start,$pc2_end,L
$pc3_start,$pc3_end,L
$pc4_start,,E
$pc4_start,$pc4_end,L
$pc5_start,$pc5_end,L
$pc6_start,$pc6_end,L
$pc7_start,$pc7_end,L
,,L
EOF
if [ $? -ne 0 ]; then
echo ERROR
exit 1;
fi
echo "Formating ${device}p1 ..."
mkfs.vfat -F 32 -n "BOOT" ${device}p1
echo "Formating ${device}p2 ..."
mkfs.ext4 -j -L "ROOTFS" ${device}p2
echo "Formating ${device}p3 ..."
mkfs.vfat -F 32 -n "BOOT_BACKUP" ${device}p3
echo "Formating ${device}p5 ..."
mkfs.ext4 -j -L "ROOTFS_BACKUP" ${device}p5
echo "Formating ${device}p6 ..."
mkfs.ext4 -j -L "CONFIG" ${device}p6
echo "Formating ${device}p7 ..."
mkfs.ext4 -j -L "CONFIG_BACKUP" ${device}p7
echo "Formating ${device}p8 ..."
mkfs.ext4 -j -L "LOG" ${device}p8
echo "Formating ${device}p9 ..."
mkfs.ext4 -j -L "DATA" ${device}p9
We are using filesystem provided from above eMMC flashing link.
Version used for sfdisk and fdisk is util-linux 2.21.2.
What we are missing? Need to add/change any more commands or need any other support in Kernel?
Note : Observation is when we run same script from Ubuntu 14.04, its flashing eMMC properly and eMMC is working fine on same MMC0 port.
Please guide us.
Thanks in advance.