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.

Wiki - OMAP-L138 Preparing SD Card for Boot - Assistance Needed

Other Parts Discussed in Thread: OMAP-L138, OMAPL138, AM1808

Hello - I am re-posting this question from about eight weeks ago, so that I am absolutely clear on the process.

Target device is an OMAP-L138 LCDK (with D800K008 boot ROM, silicon revision 2.1), capable of SD/MMC boot.

Development environment is Ubuntu 10.04.4 LTS (Lucid Lynx) using the ti-sdk-omapl138-lcdk-xx distribution + Windows 7 x86 SP1 using the TI StarterWare tools. 

I would like to boot Linux entirely off the SD/MMC card–in this case, a 4GB micro SD.  The intention is to decouple the device from the necessity of an on-board SPI or NAND flash–the SD card shall be fully field-replaceable and contain the boot loader / kernel / root filesystem.

I have read the wiki article and understand that there must be 3 separate "partitions", unformatted (AIS-signed U-boot binary) + FAT32 (kernel) + ext3 (root filesystem).  I also understand the role of the AISgen utility to set up the pinmux / PLLs / clocks etc.

That said, the resources provided with the LCDK are not very concise (let's ignore the various setup script issues for now) as regards a vanilla SD boot configuration.  The create-sdcard.sh script provided in $TI_SDK_PATH/bin/ is not designed to accomodate a multi-partition overlay for this application.

So–here's what's happened...I somehow managed to get this to work.  Once.  Since then, for whatever reason(s), I cannot seem to get the LCDK to fully boot off SD card (boot loader + kernel + root filesystem) unless I use the Serial Flash Utility (omapl138_sfl.exe?) to load U-Boot into NAND flash and load the kernel and root filesystem as per usual (as supplied from the factory).

I'm aware of the issues regarding the master boot record on the SD card, and aware of the fact that simply using the dd command to image the (AISgen-signed) boot loader binary onto the front of the SD card will not work without an offset.

What is the easiest and most straightforward way to do this, as it seems I'm missing something patently obvious here? Magic-word signing (0x41504954)? Pinmux?  Is there a default overlay for AISgen that works (consistently) for SD/MMC boot?

  • David,

    There's a procedure to prepare to boot everything off the card as you wanted at http://processors.wiki.ti.com/index.php/OMAP-L138_Preparing_SD_Card_for_Boot 

    Please give this a try and let us know if there are issues.

  • OK - figured out that I had missed quite a few details.  I now have the SD card properly formatted, with appropriate space at the front of the card, and have read the README for the uflash utility.  

    If I understand this correctly, uflash is compiled along with u-boot itself (done), and is used to write the UBL descriptor (onto sectors 1-24) and the u-boot descriptor (onto sectors 25-51).  AFAIK, the u-boot-lcdk-ais.bin  file does not require a standalone UBL to function (as it is already AIS-signed).

    I am using the config.txt file exactly as specified, with the default entry points:

    bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rootfstype=ext3 rw
    bootcmd=ext2load mmc 0 0x80700000 boot/uImage; bootm 0x80700000
    bootdelay=1
    baudrate=115200
    bootfile="uImage"
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=dm9000
    videostd=ntsc

    Using the SD card on /dev/sdb , I issued the following command (as root):

    $ ./uflash -d /dev/sdb -u u-boot-lcdk-ais.bin -vv

    and received the error

    Segmentation fault

    What am I missing here?  Does this look like a u-boot compilation issue?

  • Thanks for your reply-I have read the document, which mentions a script  mksdboot.sh  that I am unable to find within the ti-sdk-omapl138-lcdk.xx.xx.xx  distribution.  Have I missed something, or is it not present?

    I have also tried writing (using the dd command) the u-boot-lcdk_ais.bin file to the SD card (using seek=10 offset) with no results (LCDK does not boot with SW1:4 set to "on".

    On the whole, I'm generally frustrated with the lack of clear, concise and up-to-date instructions specific to the LCDK.  (I also have both LogicPD EVMs for AM1808 and OMAP-L138, instructions for which are generally a bit more thorough as provided by LogicPD.)  While I understand that there are quite a few hardware development platforms onto which to support the OMAP-L138 (Logic PD EVM / eXperimenter flavors, Spectrum Digital, Hawkboard, LCDK), I feel that the documentation could use some updating pursuant to newer offerings (excluding those features irrelevant to newer, or older, platforms)....

  • No such luck–I actually started with this document and have been trying to re-trace my steps.  

    I'm preparing an SD card overlay for a client–imaged to the correct-sized SD card, it should be bootable on the LCDK as ready-to-run, independent of the currently-flashed state of the kit (on-card U-Boot, Linux kernel and rootfs + application).

    I can work around this in the short term for purposes of application development, but I absolutely need to know that this should work consistently, and that the process is easy to understand.  To date, I cannot get the kit to boot from SD card unless U-Boot resides in the on-board NAND flash (i.e.., booting from NAND16).

  • Hi David,

    I've also been experimenting, and struggling, with SD card booting on an OMAP L138. I was wondering if you got any further? And, I thought I'd share some of the things that I have discovered.

    The main thing is that only OMAP chips with the very latest inbuilt boot ROM support SD booting. This is covered in the bootloader AN (SPRAB41D), where it explicitly states only chips with boot ROM version d800k008 support it. The modules I'm using (from critical link) only have boot ROM version d800k006, so I'm onto a nonstarter trying to get u-boot executed directly.

    Having looked into it, I believe the LogicPD EVM board is not booting directly off the SD card, instead it has a special version of the UBL stored in SPI Flash which it boots into, and it is this that then reads the u-boot image written to the SD card by the uflash utility.

    I'd be very interested know what else you've discovered?

    Regards,
    Richard