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.

AM5728: Linux/AM5728: emmc boot problem

Part Number: AM5728


I have a AM5728 custom board.

I use  ti-processor-sdk-linux-rt-am57xx-evm-06.03.00.106-Linux-x86-Install.bin

I copy the file to emmc after booting from the sd card,

unplugged the SD card, connected the power supply,

The board cannot start, uart does not print the log

Could you tell me why?

...............................................................................................

  • Hi,

    You need to also change the boot pin settings to eMMC boot. Are you doing that?

    Regards,

    Karan

  • hello,Karan

    I didn't make any changes。

    This is the logs of EMMC boot,

    Do I need to change the boot pin settings ?

    ................................................................

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 20 2020 - 04:15:00 +0000)
    DRA752-GP ES2.0
    Card did not respond to voltage select!
    Firmware loading failed
    Trying to boot from MMC2_2
    Loading Environment from FAT... Card did not respond to voltage select!
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    ** Partition 1 not valid on device 1 **
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat_buf: error reading image u-boot.img, err - -1
    Loading Environment from FAT... Card did not respond to voltage select!
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    spl: no partition table found
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

  • Hi,

    What procedure did you follow to update the files on eMMC?

    Regards,
    Vishal

  • Hello,Vishal

    This is how I update the files on emmc,

    Do you think there is something wrong?

    How do you update SD card files to emmc?

    .................................................................

    root@am57xx-evm:/# 

    root@am57xx-evm:/# fdisk /dev/mmcblk1

    Welcome to fdisk (util-linux 2.32.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


    Command (m for help): n
    Partition type
    p primary (0 primary, 0 extended, 4 free)
    e extended (container for logical partitions)
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (2048-30535679, default 2048):
    Last sector, +sectors or +size{K,M,G,T,P} (2048-30535679, default 30535679): +70M

    Created a new partition 1 of type 'Linux' and of size 70 MiB.
    Partition #1 contains a vfat signature.

    Do you want to remove the signature? [Y]es/[N]o: y

    The signature will be removed by a write command.

    Command (m for help): t
    Selected partition 1
    Hex code (type L to list all codes): c
    Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

    Command (m for help): a
    Selected partition 1
    The bootable flag on partition 1 is enabled now.

    Command (m for help): n
    Partition type
    p primary (1 primary, 0 extended, 3 free)
    e extended (container for logical partitions)
    Select (default p): p
    Partition number (2-4, default 2):
    First sector (145408-30535679, default 145408):
    Last sector, +sectors or +size{K,M,G,T,P} (145408-30535679, default 30535679):

    Created a new partition 2 of type 'Linux' and of size 14.5 GiB.
    Partition #2 contains a ext4 signature.

    Do you want to remove the signature? [Y]es/[N]o: y

    The signature will be removed by a write command.

    Command (m for help): p
    Disk /dev/mmcblk1: 14.6 GiB, 15634268160 bytes, 30535680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x9d4acef3

    Device                   Boot     Start     End           Sectors       Size      Id      Type
    /dev/mmcblk1p1     *          2048    145407      143360       70M       c       W95 FAT32 (LBA)
    /dev/mmcblk1p2             145408   30535679   30390272  14.5G    83      Linux

    Filesystem/RAID signature on partition 1 will be wiped.
    Filesystem/RAID signature on partition 2 will be wiped.

    Command (m for help): w
    The partition table has been altered.
    Failed to add partition 1 to system: Device or resource busy
    Failed to add partition 2 to system: Device or resource busy

    The kernel still uses the old partitions. The new table will be used at the next reboot.
    Syncing disks.

    root@am57xx-evm:/#

    root@am57xx-evm:/# umount /dev/mmcblk1p*
    root@am57xx-evm:/# mkdosfs -F 32 /dev/mmcblk1p1
    mkfs.fat 4.1 (2017-01-24)
    root@am57xx-evm:/# mkfs.ext4 /dev/mmcblk1p2
    mke2fs 1.44.3 (10-July-2018)
    /dev/mmcblk1p2 contains a ext4 file system
    last mounted on Sun Apr 19 02:16:01 2020
    Proceed anyway? (y,N) y
    64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to re.
    Discarding device blocks: done
    Creating filesystem with 3798784 4k blocks and 950272 inodes
    Filesystem UUID: 14434a6c-32f9-4e64-b152-8e99d0e17eca
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

    Allocating group tables: done
    Writing inode tables: done
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done

    root@am57xx-evm:/# mount -t vfat /dev/mmcblk1p1 /mnt/
    root@am57xx-evm:/# cp -f run/media/mmcblk0p1/* /mnt/
    root@am57xx-evm:/# sync
    root@am57xx-evm:/# umount /dev/mmcblk1p1
    root@am57xx-evm:/# mount -t ext4 /dev/mmcblk1p2 /mnt/
    [ 558.255223] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    root@am57xx-evm:/# tar -Jxvf tisdk-docker-rootfs-image-am57xx-evm.tar.xz  -C  /mnt/ 

                                               ....

    tar: ./lib/systemd: time stamp 2020-04-20 18:29:05 is 143516.254740087 s in the future
    tar: ./lib: time stamp 2020-04-20 18:29:09 is 143520.254600193 s in the future
    tar: .: time stamp 2020-04-20 18:29:38 is 143549.254469247 s in the future
    root@am57xx-evm:/# sync
    root@am57xx-evm:/# umount /dev/mmcblk1p2

    root@am57xx-evm:/# mount /dev/mmcblk1p1 /mnt/
    root@am57xx-evm:/# ls mnt/
    MLO u-boot.img
    root@am57xx-evm:/# umount /dev/mmcblk1p1
    root@am57xx-evm:/# mount /dev/mmcblk1p2 /mnt/
    [ 1831.289079] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    root@am57xx-evm:/# ls /mnt/
    bin dev home lib lost+found mnt run srv tmp var
    boot etc include linuxrc media proc sbin sys usr


    root@am57xx-evm:/#fdisk -l 

    Disk /dev/mmcblk0: 29.1 GiB, 31281119232 bytes, 61095936 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x6c7751e6

    Device Boot Start End Sectors Size Id Type
    /dev/mmcblk0p1 * 2048 145407 143360 70M c W95 FAT32 (LBA)
    /dev/mmcblk0p2 145408 61063167 60917760 29G 83 Linux


    Disk /dev/mmcblk1: 14.6 GiB, 15634268160 bytes, 30535680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x9d4acef3

    Device Boot Start End Sectors Size Id Type
    /dev/mmcblk1p1 * 2048 145407 143360 70M c W95 FAT32 (LBA)
    /dev/mmcblk1p2 145408 30535679 30390272 14.5G 83 Linux
    root@am57xx-evm:/#

  • Hi,

    Instead of mkdosfs, can you try mkfs.vfat for 1st partition?

    mkfs.vfat -F 32 -n "boot" /dev/mmcblk1p1
    mkfs.ext4 -L "rootfs" /dev/mmcblk1p2

    Regards,
    Vishal

  • Hello,Vishal

    Still the same as before, emmc still cannot start

    How do you format and partition the eMMC flash ?

    ........................................................................

    root@am57xx-evm:/# mkfs.vfat -F 32 -n "boot" /dev/mmcblk1p1
    mkfs.fat 4.1 (2017-01-24)
    mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
    mkfs.vfat: /dev/mmcblk1p1 contains a mounted filesystem.


    root@am57xx-evm:/# mkfs.ext4 -L "rootfs" /dev/mmcblk1p2
    mke2fs 1.44.3 (10-July-2018)
    /dev/mmcblk1p2 contains a ext4 file system labelled 'rootfs'
    last mounted on /mnt on Sun Apr 19 02:16:01 2020
    Proceed anyway? (y,N) y
    /dev/mmcblk1p2 is mounted; will not make a filesystem here!

    ....................................................................................................


    Unplug the SD card, emmc starts logs

    ..................................................................

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 20 2020 - 05:48:48 +0000)
    DRA752-GP ES2.0
    Card did not respond to voltage select!
    Firmware loading failed
    Trying to boot from MMC2_2
    Loading Environment from FAT... Card did not respond to voltage select!
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    ** Partition 1 not valid on device 1 **
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat_buf: error reading image u-boot.img, err - -1
    Loading Environment from FAT... Card did not respond to voltage select!
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    spl: no partition table found
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

  • Hi,

    Can you boot from SD card and do some tests at u-boot console?

    => mmc list
    => mmc dev 1 # assuming 1 is eMMC
    => mmc part
    => fatls mmc 1:1


    Regards,
    Vishal

  • =>
    => mmc list
    OMAP SD/MMC: 0 (SD)
    OMAP SD/MMC: 1 (eMMC)
    => mmc dev 1
    switch to partitions #0, OK
    mmc1(part 0) is current device
    => mmc part

    Partition Map for MMC device 1 -- Partition Type: DOS

    Part  Start Sector    Num Sectors       UUID                     Type
    1       2048               143360                 d2bbb0a4-01          0c   Boot
    2       247808           30287872             d2bbb0a4-02          83
    => fatls mmc 1:1
    157799 MLO
    1445892 u-boot.img

    2 file(s), 0 dir(s)

    =>

  • Hi,

    The ROM code is able to load the MLO from eMMC (Because you can see that MLO is booting fine, but fails to load u-boot)
    Also, based on last test u-boot is able to see the files on eMMC successfully.

    So the problem looks like is with MLO not able to read u-boot.img from eMMC.

    Regards,
    Vishal

  • Can you try enabling CONFIG_MMC_TRACE in include/configs/am57xx_evm.h and share the logs?

  • Hello Vishal,


    U-Boot SPL 2019.01-g31b89e620c-dirty (Aug 07 2020 - 14:12:20 +0800)
    DRA752-GP ES2.0
    CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:8
    ARG 0x000001AA
    RET -110
    CMD_SEND:55
    ARG 0x00000000
    RET -110
    CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:1
    ARG 0x00000000
    RET -110
    Card did not respond to voltage select!
    Firmware loading failed
    Trying to boot from MMC2_2
    Loading Environment from FAT... CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:8
    ARG 0x000001AA
    RET -110
    CMD_SEND:55
    ARG 0x00000000
    RET -110
    CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:1
    ARG 0x00000000
    RET -110
    Card did not respond to voltage select!
    Loading Environment from MMC... CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:6
    ARG 0x03B34800
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00001300
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00001400
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    *** Warning - bad CRC, using default environment

    CMD_SEND:6
    ARG 0x03B34A00
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    ** Partition 1 not valid on device 1 **
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat_buf: error reading image u-boot.img, err - -1
    Loading Environment from FAT... CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:8
    ARG 0x000001AA
    RET -110
    CMD_SEND:55
    ARG 0x00000000
    RET -110
    CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:1
    ARG 0x00000000
    RET -110
    Card did not respond to voltage select!
    Loading Environment from MMC... CMD_SEND:6
    ARG 0x03B34800
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00001300
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00001400
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    *** Warning - bad CRC, using default environment

    CMD_SEND:6
    ARG 0x03B34A00
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    spl: no partition table found
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

  • Can you check if the pinmux values are correct in u-boot?

  • Hello Vishal

    This is my EMMC schematic, How to  check  the pinmux values 

    4370.emmc.pdf

  • Hi,

    So, no changes were made to software for custom board? Is the board same as TI EVM?

    Regards,
    Vishal

  • Also, what is the SYSBOOT[15] setting on this board?


  • The SYSBOOT [15] defaults to 1, but I changed it to 0 is the same
    It can run with this uboot, so I think it is still a software configuration problem

    https://we.tl/t-8POBlrIsMz
  • Hi,

    What is in the attachment?
    (The above URL is blocked on our office network)

    Regards,
    Vishal

  • Downloaded it from external network.
    So the same board worked with u-boot version 2016.x and with current version (2019.x) it's not working?

  • Hi,

    yes, the same board worked with  u-boot version 2016.x and not working with current version 2019.x

    This u-boot version 2016 is not downloaded from TI official website, so I’m not sure if it’s changed,

    do you share  u-boot version 2016.x ?

  • Hi,

    2016.x version of u-boot was used in certain version of SDK.

    In 2016 u-boot were there any changes made to u-boot for custom board? may be those need to be applied to this u-boot as well.

    Regards,
    Vishal

  • Hello Vishal

    Thank you very much for your help, this problem has been solved, please help me see the next problem