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.

TMDSEVM572X: SATA boot

Part Number: TMDSEVM572X

Greetings!

I have successfully followed this guide up to (and including) step 3: 

http://software-dl.ti.com/processor-sdk-linux/esd/docs/06_01_00_08/linux/Overview_Getting_Started_Guide.html

I have verified that the SD Card I created, featuring the latest SDK, boots the EVM successfully into Linux. 

My goal now is to attempt booting the EVM from a SATA drive and I was hoping someone could direct me to a relevant resource for how to do this (I haven't been able to find one).

What I have tried so far:

After successfully flashing and booting a new SD Card I tried using the same procedure (create-sdcard.sh script) to similarly partition and flash my SATA drive. The rootfs partition was populated with the contents of the tisdk-rootfs-image-am57xx-evm.tar.xz tarball and the boot partition was populated with the MLO, u-boot.img, and uEnv.txt files. I also ensured that I set the jumpers J3 (1+2), J4 (2+3), and J6 (2+3) for SATA boot according to hardware the manual. Upon connecting power and briefly pressing and holding the power button I get some characters on the serial console ("øøøð") but it never seems to load the bootloader and I don't get any further activity on the console.

Please help me out and feel free to point out any misunderstanding I have!

Thanks a bunch,

  • Hi,

    SATA-based boot is not officially supported by the current version of the AM57xx Linux SDK however you should be able to get it to work.

    First, can you verify you set the "bootable" flag for the boot partition via fdisk? It's something easy to miss.

    Also, there are some steps documented at the below URL. Can you see if you can follow those steps outlined there (copied below as well) as a hopefully "proven" method to create a working SATA boot media:

    https://nw2sdevices.atlassian.net/wiki/spaces/NW2SB2DSP/pages/20643847/SBC-AM57x+Development+Platform?showComments=true&showCommentArea=true#SBC-AM57xDevelopmentPlatform-SATA

    export SATA_DRIVE=/dev/sda
    echo -e "n\np\n1\n2048\n204800\na\n1\nt\nc\nn\np\n2\n204801\n\nw\neof\n" | fdisk -u ${SATA_DRIVE}
    mkfs.vfat -n boot ${SATA_DRIVE}1
    mkfs.ext4 ${SATA_DRIVE}2

    Then, mount the boot partition, copy the usual bootloader images, do a 'sync', unmount, and try again.

    A couple of things to spike out that might be helpful:

    • The initial bootloader expected during SATA boot must be named "HLO". You get the HLO file by copying/renaming MLO
    • U-Boot itself should be named "u-boot.img"
    • Our CoreSDK U-Boot by default has SATA boot disabled. So you will need to enable CONFIG_SATA_BOOT and rebuild U-Boot, otherwise you won't get past SPL.
    • There is an E2E thread with related discussion showing a complete, SATA-based boot log. It also has additional discussions specifically around the Kernel command line and how it will need to get updated that you may find helpful. Note that this thread spans several pages so make sure to click the page back/forward buttons at the bottom of the page to see all of the it: https://e2e.ti.com/support/processors/f/791/p/686387/2536372

    Regards, Andreas

  • Part Number: TMDSEVM572X

    Greetings!

    I am just returning to this project and I greatly appreciate any and all assistance, thank you very much. I unfortunately am still in need of some help. 

    Since it has been some time, I went ahead and re-partitioned/flashed my SATA drive using the create-sdcard.sh script included with the PSDK 06.01.00.08 and I verified that the boot flag was set on the boot partition using the fdisk utility and that the u-boot.img file was correctly named after running the script. This time, I duplicated the MLO file and renamed the copy HLO. I again connected my SATA drive to the eSATA port on the EVM, ensured that the jumpers J3/J4/J6 were set for eSATA boot, and I was presented with the following message once I connected power and briefly held the power button.

    U-Boot SPL 2019.01-g029e4c009a (Oct 19 2019 - 21:37:25 +0000)
    DRA752-GP ES2.0
    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Per the previous recommendation, I then tried re-partitioning/flashing the SATA drive using Linux on the EVM (booted from an SD Card) by adapting the steps at the following link (there were a few typos in the instructions here by the way):

    https://nw2sdevices.atlassian.net/wiki/spaces/NW2SB2DSP/pages/20643847/SBC-AM57x+Development+Platform?showComments=true&showCommentArea=true#SBC-AM57xDevelopmentPlatform-SATA

    After flashing the drive, I manually renamed MLO to HLO and I was able to get the same error message above again.

    I am now attempting to modify U-Boot in order to enable CONFIG_SATA_BOOT and I am looking at the recommended thread at the following link for clues as to how to do this:

    https://e2e.ti.com/support/processors/f/791/p/686387/2536372?tisearch=e2e-sitesearch&keymatch=HLO%2520MLO#2536372

    Would someone at TI be able to provide me an up-to-date patch file for making the necessary changes, similar to what was provided in this thread? I am having trouble adapting the old patch file to the current version of U-Boot included with the PSDK 06.01.00.08. I also noticed that the thread participants were booting from mSATA and I am unsure of the difference this would cause in the U-Boot source code. I am attempting to boot using the eSATA port on the EVM. 

    Regards,

    True

  • True,

    True Loan said:
    ...and I was presented with the following message once I connected power and briefly held the power button...

    Yes this is as expected as none of the things needed for SATA boot are turned on by default in our current PROCESSOR-SDK-LINUX-AM57X  06_01_00_08.

    True Loan said:

    am now attempting to modify U-Boot in order to enable CONFIG_SATA_BOOT and I am looking at the recommended thread at the following link for clues as to how to do this:

    https://e2e.ti.com/support/processors/f/791/p/686387/2536372?tisearch=e2e-sitesearch&keymatch=HLO%2520MLO#2536372

    Would someone at TI be able to provide me an up-to-date patch file for making the necessary changes, similar to what was provided in this thread? I am having trouble adapting the old patch file to the current version of U-Boot included with the PSDK 06.01.00.08. 

    Thanks to the ever-evolving code base and nature of open source projects like U-Boot unfortunately any instructions become outdated quickly, although basic concepts often persists and can guide a re-implementation of sorts.

    Anyways I think a clean way to go about this is to first bring the SATA support in U-Boot SPL up to par with upstream, and then try configuring AM57xx for SATA boot. In fact doing just that will actually result in a solution that is simplified as it will only touch board-specific CONFIG options rather than updating header files etc. Please see attached tarball with different patches, try applying all of them using the 'git am *.patch' method on top of your PROCESSOR-SDK-LINUX-AM57X  06_01_00_08-based U-Boot tree and let me know what that does (I have not been able to test those patches myself, but hope that this will get us close to if not a working solution).

    Regards, Andreas

    procsdk-linux-am57xx-evm-06.01.00.08-sata-boot.tar.gz

  • Here is what I am seeing after compiling u-boot with the patches applied:

    U-Boot SPL 2019.01-gb794c34 (Dec 10 2019 - 10:06:14 -0800)
    DRA752-GP ES2.0
    Trying to boot from SATA
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

  • True,

    True Loan said:
    Trying to boot from SATA

    Alright looks like we are making some progress! I had another look, and noticed a few more loose ends needing to get addressed:

    • Need to make SATA-related DTS nodes available to SPL
    • Add some AHCI probe to the SPL SATA loader (similar to what CMD_SATA does)
    • Activate CONFIG_SPL_PIPE3_PHY

    Can you please try out attached updated patch series and let me know what you found (I have not tested with an actual SATA drive connected).

    procsdk-linux-am57xx-evm-06.01.00.08-sata-boot-v2.tar.gz

    Regards,
    Andreas