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.

TDA2SX: eMMC boot issue - ** Partition 1 not valid on device 1 **

Part Number: TDA2SX

Hi,

I am getting following error while booting from eMMC. Can anybody suggest the possible solution?

LOG:

** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1spl_load_image_fat: error reading image u-boot.img, err - -1
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

spl: no partition table found
SPL: failed to boot from all boot devices

I have also attached full log file.

Thanks,

Niraj

root@dra7xx-evm:/opt/vision_sdk#
U-Boot SPL 2016.05 (Aug 12 2019 - 11:12:44)
DRA752-GP ES2.0
no pinctrl for hs200_1_8v
no pinctrl for ddr_1_8v
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Trying to boot from MMC2_2
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl: error reading image dra7-ipu2-fw.lzop, err - -1
Error loading remotecore IPU2!,Continuing with boot ...
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl: error reading image dra7-dsp1-fw.lzop, err - -1
Error loading remotecore DSP1!,Continuing with boot ...
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl: error reading image dra7-dsp2-fw.lzop, err - -1
Error loading remotecore DSP2!,Continuing with boot ...
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl: error reading image dra7-ipu1-fw.lzop, err - -1
Error loading remotecore IPU1!,Continuing with boot ...
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

spl: no partition table found
SPL: failed to boot from all boot devices

  • Hi Niraj,

    can you give details how did you partitioned and flashed the emmc?

    Is it a custom board or an EVM?

    Also you can check if this wiki can help you:

    Regards,

    Yordan

  • Hi Yordan,

    I am using custom board based on TDA2SX SOC. Please find the attached script which i use to partition and flash eMMC.

    Regards,

    Niraj

    #! /bin/sh
    # Script to create bootable eMMC for OMAP5/DRA7xx evm.
    #
    # Author: Brijesh Singh, Texas Instruments Inc.
    #       : Adapted for dra7xx-evm by Nikhil Devshatwar, Texas Instruments Inc.
    #       : Adapted for bootable eMMC by Alaganraj, Texas Instruments Inc.
    #
    # Licensed under terms of GPLv2
    #
    
    VERSION="0.1"
    mmc_dev="/dev/mmcblk0"
    
    execute ()
    {
        $* >/dev/null
        if [ $? -ne 0 ]; then
            echo
            echo "ERROR: executing $*"
            echo
            exit 1
        fi
    }
    
    version ()
    {
      echo
      echo "`basename $1` version $VERSION"
      echo "Script to create bootable eMMC for omap5/dra7xx evm"
      echo
    
      exit 0
    }
    
    usage ()
    {
      echo "
    Usage: `basename $1` <options> [ files for install partition ]
    
    Mandatory options:
      --device              eMMC block device node (e.g /dev/mmcblk1)
    
    Optional options:
      --version             Print version.
      --help                Print this help message.
    "
      exit 1
    }
    
    check_if_main_drive ()
    {
      mount | grep " on / type " > /dev/null
      if [ "$?" != "0" ]
      then
        echo "-- WARNING: not able to determine current filesystem device"
      else
        main_dev=`mount | grep " on / type " | awk '{print $1}'`
        echo "-- Main device is: $main_dev"
        echo $main_dev | grep "$device" > /dev/null
        [ "$?" = "0" ] && echo "++ ERROR: $device seems to be current main drive ++" && exit 1
      fi
    
    }
    
    
    echo "This has to be run on target, don't run on host"
    echo "Are you running on target? (Press ENTER to continue)"
    read junkdata
    
    # Check if the script was started as root or with sudo
    user=`id -u`
    [ "$user" != "0" ] && echo "++ Must be root/sudo ++" && exit
    
    # Process command line...
    while [ $# -gt 0 ]; do
      case $1 in
        --help | -h)
          usage $0
          ;;
        --device) shift; device=$1; shift; ;;
    #    --sdk) shift; sdkdir=$1; shift; ;;
        --version) version $0;;
        *) copy="$copy $1"; shift; ;;
      esac
    done
    
    #test -z $sdkdir && usage $0
    test -z $device && usage $0
    
    #if [ ! -d $sdkdir ]; then
    #   echo "ERROR: $sdkdir does not exist"
    #   exit 1;
    #fi
    
    if [ ! -b $device ]; then
       echo "ERROR: $device is not a block device file"
       exit 1;
    fi
    
    check_if_main_drive
    
    echo "************************************************************"
    echo "*         THIS WILL DELETE ALL THE DATA ON $device        *"
    echo "*                                                          *"
    echo "*         WARNING! Make sure your computer does not go     *"
    echo "*                  in to idle mode while this script is    *"
    echo "*                  running. The script will complete,      *"
    echo "*                  but your SD card may be corrupted.      *"
    echo "*                                                          *"
    echo "*         Press <ENTER> to confirm....                     *"
    echo "************************************************************"
    read junk
    
    for i in `ls -1 ${device}p?`; do
     echo "unmounting device '$i'"
     umount $i 2>/dev/null
    done
    
    execute "dd if=/dev/zero of=$device bs=1M count=4090"
    
    sync
    
    cat << END | fdisk $device
    n
    p
    1
    
    +64M
    n
    p
    2
    
    +2G
    
    t
    1
    c
    a
    1
    w
    END
    
    # handle various device names.
    PARTITION1=${device}1
    if [ ! -b ${PARTITION1} ]; then
            PARTITION1=${device}p1
    fi
    PARTITION2=${device}2
    if [ ! -b ${PARTITION2} ]; then
            PARTITION2=${device}p2
    fi
    
    # make partitions.
    echo "Formating ${device}p1 ..."
    if [ -b ${PARTITION1} ]; then
    	mkfs.vfat -F 32 -n "boot" ${PARTITION1}
    else
    	echo "Cant find boot partition in /dev"
    fi
    
    echo "Formating ${device}p2 ..."
    if [ -b ${PARITION2} ]; then
    	mkfs.ext4 -L "rootfs" ${PARTITION2}
    else
    	echo "Cant find rootfs partition in /dev"
    fi
    
    echo "Preparing for Copy..."
    execute "mkdir -p /tmp/sdk/$$/mmc_boot"
    execute "mkdir -p /tmp/sdk/$$/mmc_rootfs"
    execute "mkdir -p /tmp/sdk/$$/emmc_boot"
    execute "mkdir -p /tmp/sdk/$$/emmc_rootfs_1"
    
    execute "mount ${mmc_dev}p1 /tmp/sdk/$$/mmc_boot"
    execute "mount ${mmc_dev}p2 /tmp/sdk/$$/mmc_rootfs"
    execute "mount ${device}p1 /tmp/sdk/$$/emmc_boot"
    execute "mount ${device}p2 /tmp/sdk/$$/emmc_rootfs_1"
    
    echo "Copying boot image from ${mmc_dev}p1 to ${device}p1"
    execute "cp /tmp/sdk/$$/mmc_boot/* /tmp/sdk/$$/emmc_boot/."
    
    echo "Copying filesystem from ${mmc_dev}p2 to ${device}p2"
    execute "cp -rvf /tmp/sdk/$$/mmc_rootfs/* /tmp/sdk/$$/emmc_rootfs_1/."
    
    sync
    echo "unmounting ${mmc_dev}p1,${mmc_dev}p2,${device}p1,${device}p2"
    execute "umount /tmp/sdk/$$/mmc_boot"
    execute "umount /tmp/sdk/$$/mmc_rootfs"
    execute "umount /tmp/sdk/$$/emmc_boot"
    execute "umount /tmp/sdk/$$/emmc_rootfs_1"
    
    execute "rm -rf /tmp/sdk/$$"
    
    execute "mount ${device}p1 /run/mmcblk1p1"
    execute "mount ${device}p2 /run/mmcblk1p2"
    
    echo "completed!"
    

  • Hi Niraj,

    can you make sure the boot partition of your emmc has uenv-emmc.txt (and u-boot.img)?

    Also can you insert the SD card, halt at u-boot and run the below commands (change boot mode to SD boot):

    1. env default -fa

    2. saveenv

    Power off the board and switch the boot mode to EMMC and check if u-boot comes up?

    Regards,

    Yordan

  • Hi Yordan,

    Yes it has u-boot.img and uenv-emmc.txt in boot partition of emmc. I suppose uenv-emmc.txt will come into effect  after SPL finds u-boot.img and executes it.

    -NIRAJ

  • Hi Niraj,

    Do you set switch settings to boot from EMMC:
    SYSBOOT [0:15] 00011100 10000001

    Regards,

    Yordan

  • Hi Niraj,

    I haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Yordan

  • Hi Yordan,

    I was using the switch setting to SYSBOOT [0:15] 00000100 10000001. Also i tried the sysboot settings suggested by you i.e SYSBOOT [0:15] 00011100 10000001 , which is giving the same result as mine.

    Thanks

    -NIRAJ

  • Hello,

    u-boot always reads uenv.txv file.

    You have to rename the uenv.txt.emmc to uenv.txt

    Regards,

    Nikhil D