This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM572x GP EVM eMMC boot issue

I have an AM572x GP EVM rev A3. The SD card boots fine, and I can access eMMC fine too. But when I tried to boot from eMMC and it didn't boot.

 

I used the folloing steps:

  1. Boot up from SD card.

  2. Format eMMC to create 2 partitions

    Device         Boot  Start     End Sectors  Size Id Type

    /dev/mmcblk1p1 *      2048  133119  131072   64M  c W95 FAT32 (LBA)

    /dev/mmcblk1p2      133120 7471103 7337984  3.5G 83 Linux

  3. Copy MLO and u-boot.img from sdcard to eMMC partition 1

  4. Extract rootfs tar ball “tisdk-rootfs-image-am57xx-evm.tar.gz” to eMMC partition 2

  5. Remove SD card and reboot

On the serial port, I only get a non ASCII byte 0xF0, and nothing else.

I noticed on rev A3a EVM schematic, there are couple of changes related to eMMC and sysboot[15]. Could any one confirm if eMMC is supposed to boot from rev A3 or A3a board? Are the changes on rev A3a board to fix eMMC boot?

Thank you!

Jan 

  • The updates you referenced on revision A3a were added to resolve the issue described in Advisory i863 of the Silicon Errata. This change was not related to booting from eMMC.

    Hopefully someone on the software team reads this thread and is able to help you with your booting from eMMC problem.

    Regards,
    Paul
  • Can you do fdisk on the eMMC and post the geometry (cylinders/heads/sectors)?

    Steve K.

  • Thank you Paul and Steve for the reply!

    Steve, here are the cylinders/heads/sectors result from fdisk with 'i' option, please let me know if I'm not using the right option to print.

    Command (m for help): i
    Partition number (1,2, default 2): 1

             Device: /dev/mmcblk1p1
               Boot: *
              Start: 2048
                End: 133119
            Sectors: 131072
          Cylinders: 2049
               Size: 64M
                 Id: c
               Type: W95 FAT32 (LBA)
        Start-C/H/S: 32/1/0
          End-C/H/S: 31/16/3
              Attrs: 80

    Command (m for help): i
    Partition number (1,2, default 2): 2

             Device: /dev/mmcblk1p2
              Start: 133120
                End: 7471103
            Sectors: 7337984
          Cylinders: 114657
               Size: 3.5G
                 Id: 83
               Type: Linux
        Start-C/H/S: 32/1/0
          End-C/H/S: 1023/16/3

  • Steve, could you please let me know if you find any issue with the fdisk info I provided? What else I need to do to make eMMC boot?

    Thanks,

    Jan

  • Sorry about that, the post got lost in my e-mails. I think the boot ROM might have issues with the geometry, maybe. I used to have a script that would change the geometry, but I cannot find it. I'll see what I can dig up.

    Steve K.

  • 5545.create-emmc.txt
    #!/bin/bash
    
    
    
    # To use this script first Flash your sd-card using
    #Create-sdcard script in SDK located in bin directory.
    #Then tar rootfs and copy the tarball in rootfs partition
    #of sd-card in any subdirectory.Copy this script to sd-card
    #and run it in the target machine using sd-card. 
    #Enter yes if anything is prompted.   
    
    
    
    
    cd /
    
    umount -f /dev/mmcblk1p1
    
    umount -f /dev/mmcblk1p2
    
    cat << EOM
    
    ==============================================================================
                            Current partitions
    ==============================================================================
    
    EOM
    
    fdisk -l /dev/mmcblk1
    
    cat << EOM
    
    ==============================================================================
                            Removing all partitions
    ==============================================================================
    
    EOM
    
    echo "....WARNING...."
    
    echo "Continuing will Erase all the current data and Partitions in EMMC"
    
    CONTINUE=0
    
    while [ $CONTINUE -eq 0 ]
    
    do
    read -p "Do You Want To Continue [y/n] :  " CHOICE
        if [ $CHOICE = 'y' ]
        then 
            CONTINUE=1
        elif [ $CHOICE = 'n' ]
        then
    	CONTINUE=-1
        else
    	echo "Wrong Choice...Enter y or n"
    	CONTINUE=0
        fi
    done
    
    if [ $CONTINUE = -1 ]
        then
    	exit
    fi
    
     
    fdisk /dev/mmcblk1 << EEOF
    d
    2
    d
    w
    EEOF
    
    echo ""
    echo "All partitions removed."
    echo ""
    echo "" 
    
    cat << EOM
    
    ==============================================================================
                                  Creating new partitions
    ==============================================================================
    
    EOM
    
    parted -s /dev/mmcblk1 mklabel msdos
    
    parted -s /dev/mmcblk1  unit cyl mkpart primary fat32 -- 0 9
    
    parted -s /dev/mmcblk1  set 1 boot on
    
    parted -s /dev/mmcblk1 unit cyl mkpart primary ext2 -- 9 -2
    
    cat << EOM
    
    ==============================================================================      
                                   New partitions
    ==============================================================================
    
    EOM
    fdisk -l /dev/mmcblk1                                       
    
    mkfs.vfat -F 32 -n "boot" /dev/mmcblk1p1
    
    mkfs.ext3 -L "rootfs" /dev/mmcblk1p2
    
    sync
    sync
    
    
    if [ -d /temp1 ]
        then 
    	rm -rf temp1
    fi
    
    
    mkdir temp1
    
    cd temp1
    
    mkdir boot
    
    mkdir rootfs
    
    mkdir temp
    
    rm -rf boot/*
    
    rm -rf rootfs/*
    
    
    mount -t vfat /dev/mmcblk1p1 boot/
    
    mount -t ext3 /dev/mmcblk1p2 rootfs/
    
    mount -t vfat /dev/mmcblk0p1 temp/
    
    cat << EOM
    
    =============================================================================
                                     COPYING U-BOOT
    =============================================================================
    
    EOM
    
    cp -R temp/* boot/
    
    
    echo "copying MLO"
    
    echo "copying u-boot"
    
    echo "copying uEnv.txt"
    
    echo "done.."
    
    
    ENTERCORRECTLY=0
    
    while [ $ENTERCORRECTLY -ne 1 ]
    do
    
    read -p "Enter the complete path to rootfs tarball : " ROOTFSPATH
    
    
    
    	if [ -d $ROOTFSPATH ]
    
    	then
    	   ENTERCORRECTLY=1
    
    	else
    
    	echo "Is not a directory OR dirctory does not exist...Enter complete path to directory containing Rootfs"
    
    	   continue
    	fi 
    done
    
    TARBALL=`ls $ROOTFSPATH | grep .tar.gz | awk '{ print $1 }'`
    
    cat << EOM
    
    ==========================================================================
    	               EXTRACTING ROOTFS ... WILL TAKE SOME TIME
    ==========================================================================
    
    EOM
    
    if [ -n $TARBALL ]
     then
    	echo "The rootfs tarball is: " $TARBALL
    
    	tar -zxf $ROOTFSPATH/$TARBALL -C rootfs/
    
    else
    	echo "Tarball does not exist"
    
    	echo "Exiting..."
    fi
    
    umount -f boot
    
    umount -f rootfs
    
    umount -f temp
    
    rm -rf boot
    
    rm -rf rootfs
    
    rm -rf temp
    
    cd ..
    
    rm -rf temp1
    
    cat << EOM
    
    ===========================================================================
                             ...FINISHED...
    ===========================================================================
    
    EOM
    

    Hi Janice,

    Put your rootfs Tarball in your sd-card and then run this script in your target machine using sd-card. That should resolve the issue.Enter yes if something is prompted.

    After flashing go to u-boot shell and type the following commands:

    # setenv finduuid part uuid mmc 1:2 uuid

    # saveenv

    That will change the boot environment to boot from emmc.

  • Thanks Aakash for the info.

    In parallel with help from Steve I tried fdisk with option to set heads and sectors, I was also able to change the geometry of the eMMC to allow boot rom to boot. I still don't understand what is the limitation on cylinders/heads/sectors, but looks like boot rom works with heads=255,sectors=63 which yields 465 cylinders overall on 3.6G eMMC, when allocating 64M for partition 1, the number of cylinders on partition 1 is ~8. Or as in your script the partition 1 cylinders=9. The TRM seems to show there are 10 bits allocated for cylinders, so it should support up to 1024 cylinders, right?

    Thank you again for sharing the info!

    Jan

  • Is this Issue is fixed ?

    I am facing the same issue with AM572x board.

    Jumper setting are default one that is sdcard and emmc.

    emmc mode board is not able to boot.

    Some one plz give steps how to boot from emmc.

    Regards

    Mahesh K