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.

Linux/TDA2PXEVM: Can't read partition table on 1:0

Part Number: TDA2PXEVM

Tool/software: Linux

Hello,

When we power on the board,  it will output "Can't read partition table on 1:0" in the boot log, the board boot  from EMMC flash.We tried it 10 times, but it succeeded  only once.

=========================boot failed log=============================

U-Boot SPL 2016.05 (Apr 23 2019 - 11:27:28)
DRA762-GP ES1.0
no pinctrl for hs200_1_8v
no pinctrl for ddr_1_8v
*** Warning - bad CRC, using default environment

i2c_write: error waiting for data ACK (status=0x116)
i2c_write: error waiting for data ACK (status=0x116)
Trying to boot from MMC2_2
** Can't read partition table on 1:0 **
** 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 ...
** Can't read partition table on 1:0 **
** 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 ...
** Can't read partition table on 1:0 **
** 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 ...
** Can't read partition table on 1:0 **
** 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 ...
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

** Can't read partition table on 1:0 **
** 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
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

** Can't read partition table on 1:0 **
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

=======================================================

Thanks a lot

Terence

  • Hi Terence,

    Can you please indicate how you flashed the u-boot and MLO to the EMMC? Can you also indicate your boot settings?
    If you're able to halt at u-boot, can you run the below command and then try to reboot and let us know if it works?

    => env default -fa
    => saveenv

    Regards
    Shravan
  • Hi Shravan,

    Firstly, the board will boot from SD card, and then we use the mk-eMMC-boot.sh which from TI to flash the  u-boot and MLO  from SD card to the EMMC. Please find the mk-eMMC-boot.sh and uenv-emmc.txt  in the end.

    On the other hand, our board can not halt at u-boot.

    Thanks a lot

    Terence

    ========================================uenv-emmc.txt===========================================

    mmcargs=setenv bootargs 'console=ttyO0,115200n8 elevator=noop root=/dev/mmcblk0p2 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0 cma=64M rootfstype=ext4 snd.slots_reserved=1,1'

    ===============================mk-eMMC-boot.sh================================

    #! /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 dra76 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

    }

    # 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


    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=1024 count=2048"

    sync

    cat << END | fdisk $device
    n
    p
    1

    +256M
    n
    p
    2


    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 -F -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"

    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"

    #echo "Copying boot image from ${mmc_dev}p1 to ${device}p1"
    execute "cp /tmp/sdk/$$/mmc_boot/* /tmp/sdk/$$/emmc_boot/."
    execute "cp /tmp/sdk/$$/mmc_boot/uenv-emmc.txt /tmp/sdk/$$/emmc_boot/uenv.txt"

    #echo "Copying filesystem from ${mmc_dev}p2 to ${device}p2"
    execute "cp -rvf /tmp/sdk/$$/mmc_rootfs/* /tmp/sdk/$$/emmc_rootfs/."
    execute "cp -rvf /tmp/sdk/$$/mmc_rootfs/home/root/apps_emmc.sh /tmp/sdk/$$/emmc_rootfs/home/root/apps.sh

    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"

    execute "rm -rf /tmp/sdk/$$"
    echo "upgrade 100%"

    ==============================================================================================