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.

SK-AM62A-LP: Flashing EMMC

Part Number: SK-AM62A-LP


Hi,

I try to flash the EMMC with Linux image, I did the below steps:

  1. Connecting to the EVM board via UART(Tera term).
  2. Sending tiboot3-am62ax-hs-fs-evm.bin, tispl.bin, u-boot.img files via XMODEM/YMODEM
  3. Configuring IP address: 

    setenv ipaddr 169.254.0.100
    setenv gatewayip 169.254.0.1
    setenv serverip 169.254.0.2
    saveenv
    ping 169.254.0.2

  4. setenv uuid_gpt_rootfs <uuid>
  5. setenv uuid_gpt_disk <uuid>
  6. gpt write mmc 0 $partitions
  7. tftpboot 0xC0000000 tisdk-thinlinux.ext4
  8. mmc rescan
  9. mmc dev 0
  10. mmc write 0xC0000000 0x22 0x96000
  11. setenv mmcdev 0
  12. setenv bootpart 0:1
  13. saveenv


    When I write boot the Linux OS goes up, But when I change the BOOTMODE switches to EMMC(BOOTMODE [ 8 : 15 ] (SW3) = 0000 0000 BOOTMODE [ 0 : 7 ] (SW2) = 1101 0011)
    I don't see the Linux OS, Can you help me please?
  • Hi Rachel,

    I am routing your query to our U-Boot expert for comments.

  • Hi Rachel,

    Could you share the failure logs that you got with EMMC bootmode ?

    Regards,
    Aparna

  • Hi Aparna,

    In the meantime, I tried to flash the U-Boot with those commands:

    1. mmc dev 0 1
    2. mmc erase 0x0 0x400
    3. tftpboot 0xC0000000 tiboot3-am62ax-hs-fs-evm.bin
    4. mmc write 0xC0000000 0x0 0x400
    5. mmc erase 0x400 0x1000
    6. tftpboot 0xC0000000 tispl.bin
    7. mmc write 0xC0000000 0x400 0x1000
    8. mmc erase 0x1400 0x2000
    9. tftpboot 0xC0000000 u-boot.img
    10. mmc write 0xC0000000 0x1400 0x2000
    11. mmc erase 0x3400 0x100
    12. tftpboot 0xC0000000 uEnv.txt
    13. mmc write 0xC0000000 0x3400 0x100
      When I change the bootmode switches to emmc, Iget the error message:
      U-Boot SPL 2021.01-g2ee8efd654 (Feb 27 2023 - 13:38:28 +0000)
      SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
      am62a_init: board_init_f done
      am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
      Trying to boot from MMC1
      am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
      Authentication passed
      am62a_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
      Authentication passed
      ti_sci system-controller@44043000: Message not acknowledgedAuthentication failed!
      ### ERROR ### Please RESET the board ###
  • Hi Rachel,

    Is this error persistently seen or does it boot after a few trials?

  • Hi Aparna,

    I tried to power off/on the board 3 times, but I still get the error message.

  • Hi Rachel,

    Are you seeing this issue on a TI EVM?

    You could try increasing the TIFS communication timeout from 10s (default) to 100s just for testing purposes to see if that makes any difference:

    diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
    index d7ec3f0bb1..05ea3d428a 100644
    --- a/drivers/firmware/ti_sci.c
    +++ b/drivers/firmware/ti_sci.c
    @@ -3030,7 +3030,7 @@ static const struct ti_sci_desc ti_sci_pmmc_am654_desc = {
     /* Description for J721e DM to DMSC communication */
     static const struct ti_sci_desc ti_sci_dm_j721e_desc = {
            .default_host_id = 250,
    -       .max_rx_timeout_ms = 10000,
    +       .max_rx_timeout_ms = 100000,
            .max_msgs = 20,
            .max_msg_size = 60,
     };

    Additionally, involved device firmware (TIFS) is undergoing continuous improvements, hence trying with the latest SDK version 9.1 might fix the issue.

    Regards,
    Aparna

  • Hi Aparna,

    Yes, I see the issue on TI EVM board.

    I want to check the latest SDK, Do you know which ARAGO_BRAND I need to put for tisdk-thinlinux-image?

    Thanks,

    Rachel

  • Hi Rachel,

    You can download the latest SDK version from ti.com: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62A

    To create .ext4 file from .tar.xz you can follow the FAQ: e2e.ti.com/.../faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2

    Regards,
    Aparna

  • Hi Aparna,

    mmc write of the .ext4 file fails on:

    => mmc dev 0 2
    switch to partitions #2, OK
    mmc0(part 2) is current device
    => mmc erase 0x0 0x927C0

    MMC erase: dev # 0, block # 0, count 600000 ...

    Caution! Your devices Erase group is 0x400
    The erase range would be change to 0x0~0x927ff

    600000 blocks erased: OK
    => tftpboot 0xC0000000 tisdk-base.ext4
    link up on port 1, speed 1000, full duplex
    Using ethernet@8000000port@1 device
    TFTP from server 169.254.0.2; our IP address is 169.254.0.100
    Filename 'tisdk-base.ext4'.
    Load address: 0xc0000000
    Loading: ################################################## 300 MiB
    10.5 MiB/s
    done
    Bytes transferred = 314572800 (12c00000 hex)
    => mmc write 0xC0000000 0 927C0

    MMC write: dev # 0, block # 0, count 600000 ... MMC: block number 0xffff exceeds max(0xfc00)
    0 blocks written: ERROR

    Do you know why(I took ti-processor-sdk-linux-rt-edgeai-am62axx-evm-09_01_00_02 version)?

  • Hi Rachel,

    Can you try the following commands and see if this works:

    => mmc dev 0 0
    => mmc erase 0x0 0x927C0
    => tftpboot 0xC0000000 tisdk-base.ext4
    => mmc write 0xC0000000 0 927C0

    Regards,
    Aparna

  • Hi Aparna,

    Thanks for your answer!.

    The .ext4 succeeded to be flashed but when I change the bootmode switches to EMMC I get the boot prompt.

    I tried to add to the uEnv.txt file:

    mmcdev=0
    bootpart=0:0

    And to flash it again but it didn't help.

  • Hi Rachel,

    Please set the following partitions correctly, at U-boot prompt, after booting from EMMC bootmode.
    This will use image flashed into EMMC UDA partition to boot into Linux.

    => printenv mmcdev
    mmcdev=0
    => printenv bootpart
    bootpart=0:1


    Let me know if this helps!

    Regards,
    Aparna

  • Hi Aparna,

    I set the above environment variables in EMMC bootmode but I still getting the U-BOOT prompt:

    => printenv mmcdev
    mmcdev=0
    => printenv bootpart
    bootpart=0:1
    => boot
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Failed to load 'boot.scr'
    Can't set block device
    ** No partition table - mmc 0 **
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    ** No partition table - mmc 0 **
    Couldn't find partition mmc 0:1
    Can't set block device
    ** No partition table - mmc 0 **
    Couldn't find partition mmc 0:1
    Can't set block device
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device
    ** No partition table - mmc 0 **
    Couldn't find partition mmc 0:1
    MMC: no card present
    starting USB...
    No working controllers found
    USB is stopped. Please issue 'usb start' first.
    starting USB...
    No working controllers found
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-1c-63-49-17-20-25
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00000000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0000000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/000000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/000
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-k3-am62ax
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-k3
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default
    link up on port 1, speed 1000, full duplex
    *** ERROR: `serverip' not set
    Config file not found
    starting USB...
    No working controllers found
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again
    =>

  • Hi Rachel,

    From the logs shared by you, looks like your EMMC is not partitioned properly.

    You can follow the steps mentioned here to partition it: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html#partitioning-emmc-from-u-boot

    After the partition is done, reboot the board, and you should get something like this:

    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: EFI
    
    Part    Start LBA       End LBA         Name
            Attributes
            Type GUID
            Partition GUID
      1     0x00000022      0x01da3fde      "rootfs"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   58fc110a-cc39-4353-b95a-5b7921b196c0
    => 
    


    Regards,
    Aparna

  • Hi Aparna,

    I created partitions and I flashed the .ext4 file to the 0x22 address.
    But when I change the bootmode switches to EMMC, The U-BOOT loads but for Linux I need to define the environment variables:
    setenv mmcdev 0
    setenv bootpart 0:1
    Do you know how can I define those variables in order the Linux will load automatically when I change the bootmode switches to EMMC?

    Thanks,
    Rachel

  • Hi Rachel,

    If you want to run fully from EMMC, you will need to modify the source code, which should have EMMC partition variables set by default.

    Please follow the steps mentioned below:

    • Modify ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/board-support/ti-u-boot-2023.04+gitAUTOINC+b0d717b732-gb0d717b732/board/ti/am62ax/ file as follows:

      --- a/board/ti/am62ax/am62ax.env
      +++ b/board/ti/am62ax/am62ax.env
      @@ -17,8 +17,8 @@ args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
      run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
      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 1 /lib/firmware/am62a-c71_0-fw

    • Build U-boot on top level using the command make u-boot.

    • Copy tiboot3.bin, tispl.bin, u-boot.img files and flash these into EMMC.

    • Try booting via EMMC bootmode.

    • Location of the files after u-boot re-build:
      ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/board-support/ti-u-boot-2023.04+gitAUTOINC+b0d717b732-gb0d717b732/build/r5/tiboot3.bin
      ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/board-support/ti-u-boot-2023.04+gitAUTOINC+b0d717b732-gb0d717b732/build/a53/tispl.bin
      ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/board-support/ti-u-boot-2023.04+gitAUTOINC+b0d717b732-gb0d717b732/build/a53/u-boot.img


    Hope this helps!

    Regards,
    Aparna

  • Hi Aparna,

    Thanks a lot, It is helped(I defined bootpart=0:1, bootpart=0:2 didn't worked me).

    Rachel

  • Hi Rachel, 

    Yes, you are right, bootpart=0:1 should work. 
    I have corrected my answer.

    Regards,
    Aparna