Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

XIP code from MMC

Other Parts Discussed in Thread: OMAP3530

From what I gather in the docs, it is possible to use XIP from MMC. i.e. it'll mirror it first.

I'd like to be able to boot my project using XIP. I tried writing the MLO image directly to SD card, but it results in some form of boot failure, with no indication as to what went wrong. So, is there something i'm missing?

1. Can I really do a raw binary executable image on SD card (with the appropriate 8 byte header)?

2. Do I need to write something else to the SD card? Does the first sector need to be blank?

3. I'm loading code to 0x4020_0000, it's less than 32K in size, I don't think I need any CH headers on the SD card as all the configuration is done in software and it works fine with using a MLO file. Should there be an issue with this?

I want to avoid having any discernable filesystem on the card. So I don't want to deal with needing partition tables and I'm planning on encrypting everything from that early boot process onwards.

  • I'm not sure what you are trying to achieve here but you should have a look at chapter 25 of the OMAP3530 reference manual (spruf98k.pdf). This explains the initialization process of the RomCode inside the CPU and details what it expects to find on the sdcard when booting from MMC. In a more general way you should follow the quick start guide provided with the OS's BSP you are targeting (WinCE or Linux), you will find everything needed to prepare a bootable SDCard.

  • No operating system is intended to be present. I have followed the information in the manual, but the boot process just seems to fail. I constructed a CHSETTINGS header which also didn't seem to help.

    What I'd really like is an example header written to the first sector of MMC, that would cause it to use XIP boot procedures. I am targetting a custom embedded application that just needs simple booting of an executable, no operating system is required it would take too much space. An example that would be ideal is something that would boot a MLO file that appears right after the initial sector. This is what the documentation states can be done, but I'm having some difficulty with it.

  • The boot ROM determines whether to boot from FAT or RAW mode based on the presence of a configuration header. I think it looks for CHSETTINGS. If found it boot RAW (what you want to do); if not found, it tries FAT. While I don't have a good configuration header, I found someone trying to create one for a Beagleboard. I think he was trying to preserve part of the Master Boot Record so that the second partition on the SD Card would show up in Linux. This is a hexdump of part of his SD Card (hexdump done from the Beagleboard):

    root@beagleboard:~# hexdump /dev/sda | head -20

    0000000 0040 0000 000c 0000 0000 0000 0000 0000

    0000010 0000 0000 4843 4553 5454 4e49 5347 0000

    0000020 ffff ffff ffff ffff ffff ffff ffff ffff

    *

    0000040 c0c1 c0c0 0100 0000 0000 0000 0000 0000

    0000050 0000 0000 0000 0000 0000 0000 0000 0000

    *

    00001b0 0000 0000 0000 0000 0000 0000 0000 0180

    00001c0 0001 fe0c 083f 003f 0000 348a 0002 0000

    00001d0 0901 fe83 e17f 34c9 0002 f299 0073 0000

    00001e0 0000 0000 0000 0000 0000 0000 0000 0000

    00001f0 0000 0000 0000 0000 0000 0000 0000 aa55

    0000200 60d4 0000 0800 4020 0012 ea00 f014 e59f

    0000210 f010 e59f f00c e59f f008 e59f f004 e59f

    0000220 f000 e59f f004 e51f 0960 4020 5678 1234

    0000230 5678 1234 5678 1234 5678 1234 5678 1234

    0000240 5678 1234 5678 1234 0800 4020 0800 4020

    0000250 68d4 4020 9a50 4020 0000 e10f 001f e3c0

    0000260 00d3 e380 f000 e129 0068 e24f 0004 e280

    0000270 2040 e3a0 2002 e080 1101 e3a0 3602 e3a0

     

    Offset 0 - 0x5F are the CHSETTINGS TOC. Offset 0x1B0 - 0x1FF contains something partition related. Offset 0x200 - 0xXXXX contain the signed x-loader. Notice the first 4 bytes are the size while the next 4 bytes are the load address 0x40200800, followed by the x-loader.

    Steve K.

  • I just used a hex editor to create the attached ch1.zip file. It has the CHSETTINGS configuration header. Unzip it. Under Linux I have a SD Card in a card reader attached as /dev/sdc. Then I did

    dd if=/dev/ch1 of=/dev/sdc

    dd if=MLO of=/dev/sdc bs=1 seek=512

    When I tried booting my Beagleboard, the x-loader booted and I saw output for it over the UART.

    Steve K.

    ch1.zip
  • Perfect! Just what I was after. I think I've tried most of this myself but it didn't seem to work. I'll compare what you have here versus what I had.

  • Thanks. That got me going. I appreciate that a lot.