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/TMDX654GPEVM: boot to emmc

Part Number: TMDX654GPEVM

Tool/software: Linux

Failed to boot to u-boot / Linux after following the following procedure. I have a Am65x/DRA80xM Evaluation Module.

Anything I did wrong?

Thanks,

**************************************************************************************************************************************************************************************************************

  1. Follow the Steps to boot to eMMC

eMMC

ROM supports booting from eMMC from boot0 partition offset 0x0

Flashing Images to eMMC

The following commands can be used to download tiboot3.bin, tispl.bin and u-boot.img from an SD card and write them to the eMMC boot0 partition at respective addresses.

      • mmc dev 0 1
      • fatload mmc 1 ${loadaddr} tiboot3.bin
      • mmc write ${loadaddr} 0x0 0x400
      • fatload mmc 1 ${loadaddr} tispl.bin
      • mmc write ${loadaddr} 0x400 0x1000
      • fatload mmc 1 ${loadaddr} u-boot.img
      • mmc write ${loadaddr} 0x1400 0x2800
      • To give the ROM access to the boot partition, the following commands must be used for the first time:
    • mmc partconf 0 1 1 1
    • mmc bootbus 0 2 0 0
    • Bootmode Switch Settings
    • After writing the images, change the bootmode switches on the evm to the following:
  • Switch No.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • SW3
  • ON
  • OFF
  • ON
  • ON
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • ON
  • SW2
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
  • OFF
        • Booting Kernel from eMMC
        • To create a software partition for the rootfs, the following command can be used:
      • gpt write mmc 0 ${partitions}
      • eMMC Layout
      • Kernel image and DT are expected to be present in the /boot folder of rootfs. To boot kernel from eMMC, use the following commands:
    • setenv mmcdev 0
    • setenv bootpart 0
    • boot

 

    • errors:
    • failed to mount ext2 filesystem
    • **unrecognizaed filesystem type **

  • Hi Zhan Liu,

    Do you use ti-processor-sdk-linux-am65xx-evm-05.01.00.11 ?

    Can you provide console log of you exact commands to flash the eMMC and then consol log of your eMMC boot ? You can put these logs in txtx files and attach these files in the e2e thread.

    Regards,
    Pavel
  • Dear Sir / Madam;

    thanks for your email. I have resolved the problem.

    However, I have another problem. When I try to save environment to eMMC, it failed.

    => setenv mmcdev 0
    => setenv bootpart 0

    => saveenv

    Can you please double check if you guys can actually save env to eMMC NOT SD card?

    Thanks,

    Zhan

    P.S. I am using ti-processor-sdk-linux-am65xx-evm-05.01.00.11

  • Zhan,

    Please open new e2e thread regarding your new issue.

    Regards,
    Pavel
  • Part Number: TMDX654GPEVM

    Tool/software: Linux

    Dear Sir / Madam;

    I have another problem. When I try to save environment to eMMC, it failed.

    => setenv mmcdev 0
    => setenv bootpart 0

    => saveenv

    Can you please double check if you guys can actually save env to eMMC NOT SD card?

    Thanks,

    Zhan

    P.S. I am using ti-processor-sdk-linux-am65xx-evm-05.01.00.11

  • Zhan,

    I will test this problem on my AM65x EVM and come back to you.

    Regards,
    Pavel
  • on eMMC boot:
    As per : git.ti.com/.../README
    linux boot uses eMMC boot 0 partition for bootloader images .
    As per TRM : www.ti.com/.../spruid7X.pdf
    4.3.2 BOOTMODE Pin Mapping
    you have to select "eMMC boot from boot partition" , SW3: 1011, SW2: 0100
    --

    On saveenv:
    What is the error you see after "saveenv" ?

  • Hi Praneeth,

    The following is the error message. I believe it still try to save to mmc1 (SD card). therefore, when the SD card is in, write successful. without SD, write failed. So why after mmc dev 0 1, it still try to save to SD?

    Thanks,

    Zhan

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    => mmc dev 0 1

    switch to partitions #1, OK

    mmc0(part 1) is current device

    => saveenv

    Saving Environment to FAT...

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_send_command: MMC: 1 busy timeout.

    ** Bad device mmc 1 **

    => mmc dev 0 0

    switch to partitions #0, OK

    mmc0(part 0) is current device

    => saveenv

    Saving Environment to FAT...

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_set_clock: Timeout to wait cmd & data inhibit

    sdhci_send_command: MMC: 1 busy timeout.

    ** Bad device mmc 1 **

    =>

  • On AM65xEVM : MMC1 is eMMC and MMC2 is SD

    This is what i see .
    Boot Settings : SD Boot
    SW2: 0010, SW3: 0110
    => mmc list
    sdhci@0: 0 (eMMC)
    sdhci@0: 1
    => mmc dev 0 1
    switch to partitions #1, OK
    mmc0(part 1) is current device
    => saveenv
    Saving Environment to MMC...
    Writing to MMC(0)... done
    update bootloader images in eMMC with instructions
    git.ti.com/.../README


    --
    Boot Settings eMMC Boot
    SW2: 0100, SW3: 1011
    => mmc dev 0 1
    switch to partitions #1, OK
    mmc0(part 1) is current device
    => saveenv
    Saving Environment to MMC...
    Writing to MMC(0)... done


    More test log : pastebin.ubuntu.com/.../
  • Are you using AM65xGPEVM Beta board?
    Can you share full log from reset ?
    what does "mmc info" , with "mmc dev 0 0" , "mmc dev 0 1", "mmc dev 1 0"
    Example: pastebin.ubuntu.com/.../


    Note: I am using a more current uboot (not the one from processor sdk 5.1 release) which contains some emmc fixes.
    These fixes [1] will be available in the next processor sdk release.

    For test purpose you can take
    git.ti.com/.../

    with instructions for emmc usage from :
    git.ti.com/.../README

    and see if it helps.

    [1] For Reference:
    CommitID 636878714c52ea3bab37bcdc5c638ea2fa10827c
    CommitID 421ef73235cd1f99e2d17e584151f5332791320e
    CommitID 60826ea82763e5578e7e848c3e735b707093f748
    CommitID e09feaae7335b4e41628d7a46a4d2bb246c57928
    CommitID 325c5a831d98ad310f9a0660a8b390ae12c80b72
  • Zhan, Did the above comment help resolve your issue ?