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.

Regarding booting OMAP35x EVM from SD card

Other Parts Discussed in Thread: AM3517

Hi,

I'm trying to get the OMAP 35x EVM to boot off of a SD card and I'm not having any success. 

I 've read and followed the very detailed post on this topic which began on 12/3/08.. I've dual-partitioned the SD card using fdisk as described in the instructions (several times), copied the MLO and uboot.bin from the SDK, and configured SW4 to what I *think* is correct.  However, when I try to boot,  although the SD card LED is lit, I get nothing out of the console.

My hardware setup:

  • OMAP 3530 EVM (Mistral board?)
  • 2GB ProMaster SD card  (is this brand usable?)
  • The settings for SW4 are SW4[8:1] = 11100110  (are these correct?  also, are there any other jumpers I need to switch?)

My partitioning scheme:

One small (50M) bootable FAT32 partition (I've tried creating it with both fdisk and Windows: neither worked), and one ext3 partition.  At the moment, I only have mlo and u-boot.bin on the SD card.  I wanted to see x-loader start, then u-boot start - then the idea was I'd move on to adding the kernel and getting linux to boot.

Command (m for help): p

Disk /dev/sdd: 1967 MB, 1967128576 bytes
255 heads, 63 sectors/track, 239 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks   Id  System
/dev/sdd1        *           1              7         56196     b     W95 FAT32
/dev/sdd2                     8             239   1863540  83   Linux

Command (m for help): x

Expert command (m for help): p

Disk /dev/sdd: 255 heads, 63 sectors, 239 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl               Start       Size ID
 1 80   1   1    0 254  63   6       63              112392    0b
 2 00   0   1    7 254  63  238   112455     3727080  83
 3 00   0   0    0   0   0    0          0                 0               00
 4 00   0   0    0   0   0    0          0                 0               00

Expert command (m for help):

user@laptop:~$ ls -l /media/sdcard/
total 120
-rwxr-xr-x 1 root root  8092     2008-12-31 09:04 mlo
-rwxr-xr-x 1 root root 109764 2008-12-31 09:04 u-boot.bin

Thanks.

 

  • Peter Sienkewicz said:
    OMAP 3530 EVM (Mistral board?)

    That would be the Mistral board.

    Peter Sienkewicz said:
    2GB ProMaster SD card  (is this brand usable?)

    I have heard of trouble with some cards (I believe Fry's Patriot cards), I use Micro Center cards with success, I do not know of ProMaster cards. If you have other SD cards around it may be worth trying others.

    Peter Sienkewicz said:
    The settings for SW4 are SW4[8:1] = 11100110  (are these correct?  also, are there any other jumpers I need to switch?)

    If your switches are like in the picture shown below  you should be good to go (depending on what you consider 1 vs 0 your description is correct), assuming your board was already working any other dip switches should already have been set properly. Your boot mode being correct is reinforced by the LED by the MMC slot being lit.

    Your partition settings seem reasonable in that the partition is W96 FAT32, bootable, and not excessively large, though it does look like you are using a bit of a different setup than I have been using, namely a smaller partition (I have been using 256MB for the boot partition, though it is wasteful it may be worth a try to start).

    Your MLO file also looks kind of small, my MLO is about 17kB, yours is half that size, perhaps there is an issue with the MLO? The MLO file I have been using is posted here if you want to give that a try.

  • Hi Bernie,

    Thanks for the quick response. The mlo file you provided did the trick.. I guess the x-load.bin.ift from my SDK is no good.

    The console now displays:

    Texas Instruments X-Loader 1.41
    Detected Samsung MuxOneNAND1G Flash
    Starting X-loader on MMC
    Reading boot sector

    109300 Bytes Read from MMC
    Starting OS Bootloader from MMC...
    Starting OS Bootloader...

    This is indicates to me that the X-loader is now working, but I suppose the uboot.bin is no good.

    I've tried using both the uboot.bin provided in the SDK and also one I've built myself, both to no avail.  I've been meaning to upgrade to the latest toolchain anyway, so I'll give that a try.

     

  • I am glad to hear that the MLO worked, that shows that the hardware is all good and the partitioning is good so you are past what has typically been the hard part of SD card booting (at least for me). Hopefully upgrading your software will give you all the pieces you need to boot properly, if you are still having trouble with X-Loader and U-Boot from the lastest SDK version (1.0.3 as of today) please let us know.

  • Hi Bernie,

    I'm trying to build u-boot using a newer toolchain I could get my hands on (arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu) and the latest uboot source (u-boot-v2).

    It seems i'm running up against the same problem somebosy else ran up against i.e:

    make[1]: *** No rule to make target `hello_world.srec', needed by `all'.  Stop.
    make[1]: Leaving directory `/net/netscratch/sheng/OMAP35x_SDK_1.0.2/board_utilities/u-boot/examples'
    make: *** [examples] Error 2

    as discussed in https://community.ti.com/forums/p/2400/9105.aspx

    Unfortunately the thread ends at a dead end.

    Currently, my process is as described in the Getting Started Guide:


    $ cd u-boot
    $ make omap3evm_config
    $ make

    Any ideas?

    Thanks again.

  • Since you mention your tool chain version my first guess would be some difference in how the tool chain handles things, I use the ARM-2007Q3 toolchain from Code Sourcery as mentioned in the Getting Started Guide, I run the same commands for building U-Boot and it works for me, so this may be worth a shot.

  • Hi Bernie,

    I commented out the 'examples' dir in the makefile and that did it.  I'm now booting into U-boot.

    Thanks for your help.. I'll let you know if I have any other problems.

     

  • Hi Bernie,

    I have a OMAP 35x U-boot question for you:

    I configured the 'bootargs' and 'bootcmd' variables in U-boot without specifically setting the bootdelay variable.  (Hindsight = 20-20).  Now, when I start up the board, I'm not able to interrupt the autoboot sequence, no matter how quickly I try to interrupt it with a key press. 

    Do you know any ways to either force entry into the U-boot command prompt or to reset the flash to its default values (i.e erasing the bootargs/bootcmd variables I created, allowing me to enter autoboot again)?

    Also, a quick aside:

    I've noticed on occasion that while booting off of the SD card, occasionally it hangs while loading the kernel.  If I perform a hard reset, then it loads fine.  I'm assuming this is some sort of MMC initialization timing issue.  Have you ever run into this and know of any potential workarounds?

    Thanks again.

  • Peter Sienkewicz said:
    Do you know any ways to either force entry into the U-boot command prompt or to reset the flash to its default values (i.e erasing the bootargs/bootcmd variables I created, allowing me to enter autoboot again)?

    Sorry for the delay, I was on vacation last week, you could fix this by reflashing U-Boot using the serial loader as described in the getting started guide however that would be overkill. You should be able to interrupt U-Boot and get the prompt by pressing CTRL-C while U-Boot is loading the kernel, but it must be done before the kernel actually starts booting as then U-Boot will have exited.

    Peter Sienkewicz said:
    I've noticed on occasion that while booting off of the SD card, occasionally it hangs while loading the kernel.  If I perform a hard reset, then it loads fine.  I'm assuming this is some sort of MMC initialization timing issue.  Have you ever run into this and know of any potential workarounds?

    I have not noticed any hanging when booting from SD cards, it has always been fairly reliable for me once it was booting at all. This could be any number of things, to try to figure it out i would first be interested in where the kernel hangs and if any error messages come out of the terminal. I am curious how often this happens and if it is definitely tied to the SD card boot? Perhaps it could be worth trying another SD card (brand)?

  • Hi Bernie,

    I am also into the same problem. somehow my bootdelay is corrupted, now i am not able to enter into u-boot command prompt.

    I have tried above mentioned 2 methods (1. CTRL + C and reflashing using serial cable). but both ways i could not get the command prompt of u-boot.

    When i tried to reflash using serial cable, the u-boot image is transffered successfully, but after that u-boot is loading the kernel automatically. by the time i connect back the serial cable to the UART-1, already filesystem also started running.

    Please let me know is there any other way to interrupt the u-boot before it starts the kernel.

    Thanks,

    kolusu

  • I am suprised that CTRL C would not work, I assume your terminal program is working correctly otherwise? Note that the CTRL C method takes some timing, I am able to get it to reliably bring up the U-Boot prompt but it must be done while U-Boot is still active, as soon as it goes to 'Starting kernel ... Uncompressing Linux ...' than you have exited U-Boot and CTRL C will do nothing, so you need to hit CTRL C while U-Boot is loading up the kernel but before it starts execution. If it is still not working than perhaps U-Boot itself is corrupted, or you are using a different or modified version.

    It looks like the serial loader will only help if the U-Boot environment is not set to automatically boot immediately already, since loading the U-Boot does not update the environment unfortunately. One way around this would be to modify U-Boot such that it ignores the existing environment and is hardcoded to have the delay and than boot that version serially. Once booted you could use U-Boot commands to erase the flash and than go through a reflash procedure with the serial loader to get to the original condition. Hopefully you will be able to get the CTRL C method to work so as to avoid having to modify, rebuild, and load U-Boot to recover your environment.

  • Hi Bernie,

    Thanks for your info.

    I have solved this problem by reflashing the u-boot.

    I have changed the bootdelay value to 99  in source code of u-boot and built it and loaded to target using serial port. Since i have given 99 bootdelay for this boot loader i am able to interrupt the u-boot auto-start. Then, i have flashed the modified u-boot to the target from the current running u-boot command prompt . This is how i have solved the problem.

    Regarding CTRL+C, this command is not working with my u-boot. I guess no problem with terminal program, may be u-boot was corrupted.

    Meanwhile, i am trying to store two root file systems in flash. i have observed that there are 5 MTD partitions created in onenand flash. If i want to store one more file system in flash, do i need to create one more partition? if so, how to do it?  do u have any idea about it? Please help me in this regard.

    Thanks

    Thanks.

  • Hi Kolusu,

    In order to load the built u-boot.bin to the target using the serial port, I was wondering what your SW4 settings were?

    Also, did you do this via the DownloadUtility.exe? 

    Thanks,

    Peter

  • Hi, I also have the problem to stop auto-booting and get into the u-boot menue. Pressing Ctrl-C does not work and reflashing the given u-boot.bin from the \board_utilities\OMAP35x directory with the downloadUtility does not change anything as well. (Btw: Does someone know whether there is a Linux-Application to download u-boot, It's a bit time consuming to switch back and forth between two operating systems).

    Nevertheless, I also tried to recompile the source files. But where to change the default configuration?

    Kolusu said:

    I have changed the bootdelay value to 99  in source code of u-boot and built it and loaded to target using serial port.


    I found a "CONFIG_BOOTDELAY" define in  "u-boot\include\configs\omap3evm.h"

    So I changed line 375 from

    #define CONFIG_BOOTDELAY 0
    to
    #define CONFIG_BOOTDELAY 10

    Unfortunately that did not change anything. AutoBooting still starts immediately [:(]

     

    Do I have to look in another file? Or is there any other way to reconfigure U-Boot?

     

    Thanks in advance!

     

  • Mmh Ok,

    Even though it's a bit strange to me I "solved" the problem. I entered 99 for CONFIG_BOOTDELAY and now it's working.
    10 seems to be a non-valid value [:P]

     

  • hello,

    can you send me the instruction how to create a bootable SD/MMC card?

    I understand that the instructions are for Linux Host, do you have instruction for Windows host , as well? pls send .

    my host is windows ,and the target OS is vxworks .

    tia,

    yuda

     

  • This article has instruction for process under Linux as well as link (near top of article) to process under Windows: http://wiki.davincidsp.com/index.php/SD/MMC_format_for_OMAP3_boot

  • hello,

     

    I want to run  vxworks OS ,  from uSD , , so I migrated  x-load to vxworks environment , and change the uboot-xx.bin file name to vxworks.bin file name .

    for my understaning the name MLO  (x-load) is a saved name , the prom is looking for this name to load to internal sram  , is it right ?

    did you find any problems working with uSD ? hint ? what should be the uSD size ?

    thx

    yuda

     

  • Hi Kolusu,

     

    To cut the story short, I am having the same issue which is resolved by you.

    Even after changing the bootdelay to 99 and transferring it to the target. How are you able to interrupt the u-boot auto-start even before updating with the newer u-boot.bin?

     

    Thanks,

    Waman Prabhu

  • Hi Bernie,

    Greetings from India!

    I am working am3517evm and the bootdelay was edited to zero. CTRL+C doesn't work and not sure uboot corrupt; how do I recover it.

    Even after changing the bootdelay to 99 and transferring it to the target. How are you able to interrupt the u-boot auto-start even before updating with the newer u-boot.bin?

    Or how to update the uboot after complete boot from linux prompt. fw_*** utility is installed. nanderase and write gives error on file operation and permission issue resp.

    Any important links on how to reflash the nand.

     

    Thanks,

    Waman Prabhu

  • In general you should be able to use CTRL-C to get into the U-Boot prompt, if that is not working you may want to double check your UART connection to ensure you are actually sending characters.

    If you cannot than you would need to otherwise erase the flash segment that contains the U-Boot environment, this may vary depending on the version but for the current version you should be able to erase 0x001C0000-0x0027FFFF as per http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_04.02.00.07_UserGuide#NAND_Layout. If you can boot into U-Boot through some other means such as UART or SD Card boot which is setup to not use that section of NAND for environment storage you could than use the U-Boot commands described on that page to erase the environment section of NAND.

  • Hi Bernie,

    Thanks for the reply.

    After getting access to the u-boot prompt. I am not able to update the modified u-boot, kernel or boot the linux.

    details:

    no devices available
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    AM3517_EVM #
    AM3517_EVM # mmc init
    mmc1 is available
    AM3517_EVM # fatload mmc 1 0x82000000 u-boot.bin
    reading u-boot.bin

    216824 bytes read
    AM3517_EVM # nandecc hw
    Error: Can't switch ecc, no devices available

    I am not able read/write or get info on nand device.

     

    Thanks.

  • It sounds like at least the MMC interface is working, so you should be able to continue to boot from there if you need to. The NAND message is a bit odd, it sounds like U-Boot is not detecting your NAND for some reason, but since the EVM uses a SoM there is not a socket to reseat or anything. 

    Waman Prabhu said:
    AM3517_EVM # nandecc hw
    Error: Can't switch ecc, no devices available

    Are there any other warnings/errors that print out from U-Boot before you get to the prompt? Are you booting from a SD card in this case? If so you may need to double check that the SD card based U-Boot image you are using happens to have support for the particular NAND on the SoM, I suspect it will but this may be worth checking. 

  • Here's the summary;

    Texas Instruments X-Loader 1.46 (Jun 15 2011 - 09:45:18)
    Starting OS Bootloader...
    OMAP34xx/35xx-GP ES1.0, CPU-OPP2 L3-165MHz
    AM3517EVM Board + LPDDR/NAND
    I2C:   ready
    DRAM:  256 MB
    Using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Die ID #7f76000100000000015da3960501e009
    Net:   davinci_emac_initialize
    Ethernet PHY: GENERIC @ 0x00
    DaVinci EMAC

    no devices available
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    AM3517_EVM # mmc init
    mmc1 is available
    AM3517_EVM # fatload mmc 1 0x82000000 uImage
    reading uImage

    1874976 bytes read
    AM3517_EVM # bootm 0x82000000
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-2.6.32
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1874912 Bytes =  1.8 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    Uncompressing Linux......................................................................................................................... done, booting the kernel.
    [    0.000000] mux: Could not set signal i2c2_scl
    [    0.000000] mux: Could not set signal i2c2_sda
    [    0.000000] mux: Could not set signal i2c3_scl
    [    0.000000] mux: Could not set signal i2c3_sda
    [   54.335205] tca6416-keypad 3-0020: failed reading register
    [   54.355194] pca953x 3-0021: failed reading register
    [   55.095886] failed to get can_stb
    [   55.147766] maXTouch 1-004a: Failure accessing maXTouch device
    [   55.153656] maXTouch 1-004a: Chip could not be identified
    [   55.166198] Power Management for TI OMAP3.
    INIT: version 2.86 booting
    Please wait: booting...
    skipping udev...
    Remounting root file system...
    skipping networking...
    Tue Dec  8 14:49:00 UTC 2009
    INIT: Entering runlevel: 5
    skipping telnetd...
    skipping syslog...
    skipping thttpd...
    Starting PowerVR services...
    Module bc_example failed to load. Retrying.
    Running /sbin/depmod
    Continuing to load PowerVR services
    Loaded PowerVR consumer services.

    login[549]: root login  on `tty1'

    login[548]: root login  on `ttyS2'

    No initial application specified in /etc/profile.d/zlaunch.sh...continuing...
    root@am3517-evm:~# mount -t vfat /dev/mmcblk0p1 /media/card
    root@am3517-evm:~# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00080000 00020000 "xloader-nand"
    mtd1: 001c0000 00020000 "uboot-nand"
    mtd2: 00040000 00020000 "params-nand"
    mtd3: 00500000 00020000 "linux-nand"
    mtd4: 1f880000 00020000 "jffs2-nand"
    root@am3517-evm:~# flash_eraseall /dev/mtd2
    Erasing 128 Kibyte @ 40000 -- 100 % complete.
    root@am3517-evm:~# nandwrite -p /dev/mtd2 /media/card/u-boot.bin
    Writing data to block 0 at offset 0x0
    Writing data to block 1 at offset 0x20000
    root@am3517-evm:~# nanddump -no -l 0x80000 -f /media/card/u-boot.bin /dev/mtd2
    Block size 131072, page size 2048, OOB size 64
    Dumping data starting at 0x00000000 and ending at 0x00040000...
    root@am3517-evm:~# reboot -f