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.

AM62A7: Can not boot from emmc

Part Number: AM62A7

Tool/software:

Dear  TI expert:

We are using the AM62A SoC chip. After flashing the eMMC according to the method described in this TI reference link:
https://dev.ti.com/tirex/explore/node?node=A__AQkwMvG9F0GKWPdIDOFokg__AM62A-ACADEMY__WeZ9SsL__LATEST
the system fails to boot from eMMC with absolutely no console output.

Critical details:

  1. This is the first-time programming of the eMMC – the storage was completely blank prior to flashing.

  2. We confirm the three bootloader files (tiboot3.bin, tispl.bin, and u-boot.img) have been successfully flashed to the /dev/mmcblk0boot0 partition.

  3. Please confirm whether any additional steps are required to enable normal eMMC boot functionality.

Thank you for your assistance!

Best regards,
Kangbai Li

  • Hi Kangbai Li,

    Could you confirm that the boot switches have been set for eMMC boot as shown here - 
    https://dev.ti.com/tirex/explore/node?node=A__AdiJTo4R4V5RmRA6eK4Ocg__AM62-ACADEMY__uiYMDcq__LATEST

    Regards,
    Johnson

  • Hi Johnson,

    I have definitely confirmed that the boot mode is set to eMMC.

    Best regards,
    Kangbai Li

  • Hi Kangbai,

    I'm looping in an expert. Please allow him some time to get back to you.

    Regards,
    Johnson

  • Hello,

    Could you please confirm if you have followed the below steps as well

    dev.ti.com/.../dev-flash-linux-emmc.html

    Thanks!

  • Hi,

    Yes, we burned the emmc according to the method in the link. Below is the script we wrote

    #!/bin/bash
    
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    echo "emmc flash start"
    
    
    echo 0 > /sys/block/mmcblk0boot0/force_ro
    
     dd if=/home/tiboot3-am62ax-hs-fs-evm.bin of=/dev/mmcblk0boot0 seek=0
     dd if=/home/tispl.bin of=/dev/mmcblk0boot0 seek=1024
     dd if=/home/u-boot.img of=/dev/mmcblk0boot0 seek=5120
    
    
    fdisk /dev/mmcblk0 <<EOF
    d
    n
    p
    1
    1024000
    15269854
    y                                      //有etx4格式时需要运行
    w
    EOF
    umount /dev/mmcblk0p1
    mkfs.ext4 /dev/mmcblk0p1
    mkdir -p /mnt/temp
    mount -t ext4 /dev/mmcblk0p1 /mnt/temp
    cd /mnt/temp
    tar xf /home/tisdk-tiny-image-am62axx-evm.rootfs.tar.xz
    cd ..
    umount temp
    

    Best regards,
    Kangbai Li

  • Hello,

    The previous link refers to the section

    Change Boot Mode and U-Boot Env

    Have you done the steps listed in this section?

  • Hi,

    Yes, I omitted that step. Now my board can boot normally from eMMC. However, we now have another issue: during the "Change Boot Mode and U-Boot Env" step, we need to input commands in the UART console. We want to avoid manual input in the UART console because we have a large number of boards requiring eMMC programming, and this approach would be too inefficient. We hope that after inserting the SD card, the system can run our custom script to program the eMMC and change the boot mode. Then, after removing the SD card, the board can boot normally from eMMC. Is there a way to achieve this?

    Best regards

    Kangbai Li

  • Hello,

    The "mmc partconf" and "mmc bootbus" commands can be saved in the uEnv.txt file which is present in the SD card FAT partition. This file is loaded by the A53 U-Boot allowing running certain commands before booting Linux.

    [11:26:59.257] root@am62xx-lp-evm:/run/media/boot-mmcblk1p1# cat uEnv.txt
    [11:27:01.512] # This uEnv.txt file can contain additional environment settings that you
    [11:27:01.531] # want to set in U-Boot at boot time.  This can be simple variables such
    [11:27:01.536] # as the serverip or custom variables.  The format of this file is:
    [11:27:01.540] #    variable=value
    [11:27:01.545] # NOTE: This file will be evaluated after the bootcmd is run and the
    [11:27:01.549] #       bootcmd must be set to load this file if it exists (this is the
    [11:27:01.553] #       default on all newer U-Boot images.  This also means that some
    [11:27:01.563] #       variables such as bootdelay cannot be changed by this file since
    [11:27:01.566] #       it is not evaluated until the bootcmd is run.
    
    [11:27:01.569] uenvcmd=mmc partconf 0 1 1 1;mmc bootbus 0 2 0 0

    The environment variables "mmcdev" and "bootpart" have to be modified directly in the U-Boot source code for the A53 U-Boot to boot Linux from eMMC automatically.

    diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env
    index f36ac17593f..ea0d81b11fe 100644
    --- a/board/ti/am62ax/am62ax.env
    +++ b/board/ti/am62ax/am62ax.env
    @@ -14,8 +14,8 @@ run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
     
     boot_targets=mmc1 mmc0 usb pxe dhcp
     boot=mmc
    -mmcdev=1
    -bootpart=1:2
    +mmcdev=0
    +bootpart=0:1
     bootdir=/boot
     rd_spec=-
     rproc_fw_binaries= 0 /lib/firmware/am62a-mcu-r5f0_0-fw 2 /lib/firmware/am62a-c71_0-fw