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.

Booting from SD card - OMAP L138

Other Parts Discussed in Thread: OMAP-L138

in the past we  experienced problems with SD card corruption after unexpected shutdown.

in order to solve it we did the following:

the u-boot and uImage are stored in the 8Mb external SPI nor flash.

the sd card has 2 partitions of EXT3 format

one partition has a file system gunzip image in one file.

the other partition has our application files with the executables and configuration files.

when uboot runs it load the fgunziped file system image from the SD card to  /dev/ram  by using a ext2load command of u-boot.

bootargs 'ip=192.168.15.248:::::eth0:on console=ttyS1,115200n8 root=/dev/ram0 rw initrd=0xc1180000,25M mem=64M'

bootcmd 'sf probe 0;sf read 0xc0700000 0x50000 0x200000;mmcinfo;ext2load mmc 0 0xc1180000 ramdisk.gz;bootm 0xc0700000'

We selected this solution to avoid reading and writing to the first partition. 

 

in order to test this solution we are powering the system off and on.

Every second power up we get the 

ST0 ERROR 40  

** ext2fs_devread() read error - block

** Unable to read "ramdisk.gz" from mmc 0:1 **

it seems the SD is not corrupted because if we power off and on again it succeeds.

can any one help understand this problem ? suggest where to go from here ?

 see uboot console below.

 

Thanks.

Roy

 

U-Boot 2009.11 (Nov 28 2010 - 16:30:24)

 

I2C:   ready

DRAM:  64 MB

MMC:   davinci: 0

In:    serial

Out:   serial

Err:   serial

ARM Clock : 300000000 Hz

DDR Clock : 150000000 Hz

Net:   Ethernet PHY: GENERIC @ 0x00

 

Hit any key to stop autoboot:  3  2  1  0 

8192 KiB M25P64 at 0:0 is now current device

Device: davinci

Manufacturer ID: 1b

OEM: 534d

Name: 00000 

Tran Speed: 25000000

Rd Block Len: 512

SD version 2.0

High Capacity: No

Capacity: 2002780160

Bus Width: 4-bit

Loading file "ramdisk.gz" from mmc device 0:1 (xxa1)

 [ ST0 ERROR 40] 

block read failed: -18

 ** ext2fs_devread() read error - block

** Unable to read "ramdisk.gz" from mmc 0:1 **

## Booting kernel from Legacy Image at c0700000 ...

   Image Name:   Linux-2.6.32-rc6

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    1932568 Bytes =  1.8 MB

   Load Address: c0008000

   Entry Point:  c0008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux................................................................................................................................ done, booting the kernel. 

 

  • Hi,

    We are looking into this issue. We'll get back to you ASAP.

    Regards, Sudhakar

  • Hi  Roy,

             What  version of the kernel and u-boot  are  you using? . I  tested the OMAP-L138 evm with  davinci 3.20.0013 (linux 2.6.33) release and  didn't find any issue.  I formatted the SDcard with EXT3 file system and stored a gunzip test Image in the SDcard.  In order to test,  I modified the boot command as below, 

                     bootcmd=mmcinfo;ext2load mmc 0 0xc1180000 test.tar.gz;tftp;bootm

    There was no issue and the  test image(test.tar.gz ) got read  successfully on every reboot(Power off/on).

    Please let us know  the sequence of steps followed.

    Regards,

    N.Sugumar

     

     

     

     

     

  • block read failed: -18

     

    I think this is the major problem. u-boot could not read from SD card. trace the code see what happened.

     

    and, before doing that, I remembered I saw a post somewhere telling to change the SD card, sometimes it works.

     

    good luck!

  • u-boot version compiled from dvdsdk_4_00_00_22 is: 2009.11 

    uImage compiled from PSP-SDK-03.20.0.08 is: 2.6.32.-rc6

    my first experiance was what I desrcribed above. after few more tries the second partition (the one that I use to read and write) was corrupted also.

    I am using 2GB sandisk cards. is there a recomended procedure to prepare the SD ? can it be the the way I partition it and afterward format it to EXT3 is not the right way ?

    >sudo /sbin/parted /dev/sdb print

    >sudo /sbin/parted /dev/sdb rm 1   // usally it comes from vendor with FAT partition

    >sudo /sbin/parted /dev/sdb mkpartfs primary ext2 0 1976M

    >sudo mkfs.ext3 /dev/sdb1

     

    another thing that I noticed : 

    I have few 2GB bytes sd cards manufactured by sandisk bought not in the same time.

    the ones bought earlier has 1976MB storage and tend to corrupt less when powering down unexpectadlly.

    the ones bought later has 2003MB storage tend to corrupt all the time. is there any logic explanation ? should I try other card from other vendors ?

     

    Thanks.

    Roy 

     

     

  • Hello,

    have you looked at DVSDK 4.x Software Developers Guide ? This doc has instruction on creating the SD card. The u-boot and UBL shipped with DVSDK 4.x supported reading from SD card. Please use the mksdboot script for creating the SD card.

    Thanks

    Brijesh