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.

AM335x SD Card boot in raw mode

Guru 10570 points


Hi,
I am evaluating AM335x MMC/SD Card boot in Raw Mode.
I have some questions about binary image used on it.
Please let me confirm.

There is description as follows. (spruh73n: P4986)

a) I understand the binary image is like following:
Is my understanding right?

b) If yes, how do you write this image to sector #0 of SD Card?
Because I have written it to SD Card but it can not work.
I am using Linux PC (Ubuntu) "dd" command.

c) If no, can you share one of binary example?
Or, can you show me the correct format?

Best regards, RY

  • I will ask the software team to look at this.
  • Biser,
    Thanks for your help.
    I am looking forward to return from software team.
    Regards, RY
  • Hi RY,

    in the excerpt from the TRM it is written that first is the Configuration Header and then the GP Header, while on your picture it is the GP Header at the beginning. Can you try to place first Configuration Header and then the GP Header?

    Also dd command is suitable for writing the images to SD card. Can you show the exact command you use?

    Regards,
    Yordan
  • Yordan-san,

    Thanks for your help!
    Sorry for my late reply.

    I tested to place first Configuration Header and then the GP Header as following.
    But I can NOT work well. I attach the write sequence to SD card. Can you check this?

    Best regards, RY

    tocSample2.bin

    1. Format SD Card as FAT32.

    2. Read first 512 byte sector of SD Card and save as sector.bin
    3. Write tocSample2.bin to first sector of SD Card.
    4. Read back first 512 byte sector of SD Card and save as sector2.bin

    4. Confirmed first 512 byte sector of SD Card is same as tocSample2.bin by checked both sector.bin and sector2.bin.

    5. Insert SD Card to AM3358SK and power on.
    6. Connect CCS. But it can not work.

  • Hi RY,

    the 'dd' commands you use seems correct. I have concerns about the "Configuration Header" contents - it looks incomplete.
    Please check this thread:

    e2e.ti.com/.../1677744

    there you can find attached file "1234.RAW_MLO_HEADER.txt" which contains Configuration Header, you can use it in front of your GP header.

    Regards,
    Yordan
  • Yordan-san,

    Thank you so much!
    I will check and get back to you after checking in our EVM.

    Best regards, RY

  • Also, I did a hexdump of an MLO I build. The beginning looks like this

    00000000  40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00  |@...............|
    00000010  00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00  |....CHSETTINGS..|
    00000020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
    *
    00000040  c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00  |................|
    00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000200  90 29 01 00 00 04 2f 40  75 00 00 eb 00 00 0f e1  |.)..../@u.......|

    Notice that the GP header starts at 0x200.

    Steve K.


  • Steve-san,

    Thanks for your help.
    I have tested but it does not work yet..
    Can you see any mis-understanding?

    Best regards, RY


    My hexdump:

    Power on and conect CCS. it does not work.


  • It worked !! Thanks !!

    Best regards, RY

  • Hi RY,

      I have found this thread very useful as I am also attempting to boot from an SD card in raw mode.  I am working with a DM814x, but the technical requirements seem to be very similar.  I am curious as to what happened between July 14th and July 26th.  For you it went from not working, to working.  Can you share what changed in that time frame?  Thanks for any help you can provide.

    Chris

    Short background:  I am trying to load a very simple assembly program, created in CCS, to alter the behavior of the WDT.  I "bricked" the NOR on my consumer product, which also has an SD cage.  I am trying to determine if the SD card is on the boot list, since not all SD interfaces are scanned.  I can see my display reset (gray to black) every 3 minutes, which is the default WDT interval.  If I can change this behavior, I will know the SD card is a boot device, and I can move on to the next stage of trying to recover.

    Raw file:

    
    00000000  40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00  |@...............|
    00000010  00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00  |....CHSETTINGS..|
    00000020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
    *
    00000040  c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00  |................|
    00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000200  48 00 00 00 00 00 30 40  e3 0a 5a aa e3 05 65 55  |H.....0@..Z...eU|
    00000210  e3 07 70 48 e3 44 78 1c  e3 07 80 34 e3 44 88 1c  |..pH.Dx....4.D..|
    00000220  e1 c7 50 b0 e1 a0 00 00  e1 a0 00 00 e1 a0 00 00  |..P.............|
    00000230  e1 a0 00 00 e1 a0 00 00  e1 a0 00 00 e1 a0 00 00  |................|
    00000240  e1 a0 00 00 e1 a0 00 00  e1 a0 00 00 e1 c7 60 b0  |..............`.|
    

    Assembly code (CCSv7), crude, but hopefully effective: