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.

Linux for LCDK didn't come up from Sdcard by nand boot mode

Other Parts Discussed in Thread: OMAP-L138, DA8XX, PMP, LINUXSDK-OMAPL138

Hi,

When I follow the steps provide by quick start guide, the serial port print the information as below, the linux for LCDK hasn't come up rightly. I guess the problem maybe that "reading boot.scr   ** Unable to read "boot.scr" from mmc 0:1".  I use the Sdcard attached and havn't changed anything. So what's the problem about. Thank you for you help.

NAND: 512 MiB
MMC: davinci: 0
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
ARM Clock : 456000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x07
DaVinci-EMAC
Hit any key to stop autoboot: 0
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
reading uImage

2040348 bytes read
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.1.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2040284 Bytes = 1.9 MiB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.1.10 (root@VPC-U1104) (gcc version 4.5.3 20110311 (prerelease) (
GCC) ) #7 PREEMPT Fri May 11 11:15:57 CDT 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: AM18x/OMAP-L138 LCDK
Memory policy: ECC disabled, Data cache writeback
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=o
ff
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125856k/125856k available, 5216k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xc8800000 - 0xfea00000 ( 866 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0396218 (3641 kB)
.init : 0xc0397000 - 0xc03ba000 ( 140 kB)
.data : 0xc03ba000 - 0xc03db160 ( 133 kB)
.bss : 0xc03db184 - 0xc03f4c1c ( 103 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
EMAC: MII PHY configured
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource timer0_1
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 245
io scheduler noop registered (default)
da8xx_lcdc da8xx_lcdc.0: GLCD: Found VGA_Monitor panel
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
console [ttyS2] enabled
brd: module loaded
ahci ahci: forcing PORTS_IMPL to 0x1
ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc
scsi0 : ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask ffffff7f
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[7]: device 0:07, driver unknown
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 1
Waiting for USB PHY clock good...
ohci ohci.0: irq 59, io mem 0x01e25000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: DA8xx OHCI
usb usb1: Manufacturer: Linux 3.1.10 ohci_hcd
usb usb1: SerialNumber: ohci.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
i2c /dev entries driver
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
asoc: tlv320aic3x-hifi <-> davinci-mcasp.0 mapping ok
ALSA device list:
#0: DA850/OMAP-L138 EVM
TCP cubic registered
NET: Registered protocol family 17
davinci_emac davinci_emac.1: using random MAC addr: 76:8d:77:8a:f1:95
mmc0: new SDHC card at address 1234
console [netcon0] enabled
netconsole: network logging started
mmcblk0: mmc0:1234 SA04G 3.63 GiB
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
mmcblk0: p1 p2 p3 < p5 >
ata1: SATA link down (SStatus 0 SControl 300)
EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is rec
ommended
kjournald starting. Commit interval 5 seconds
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): recovery complete
EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
Freeing init memory: 140K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
udevd (946): /proc/946/oom_adj is deprecated, please use /proc/946/oom_score_adj
instead.
Remounting root file system...
Caching udev devnodes
Populating dev cachetar: dev/.tmp-block-179:1: No such file or directory
tar: dev/.tmp-block-179:5: No such file or directory
tar: error exit delayed from previous errors
mv: cannot rename '/tmp/devices': No such file or directory
FAT-fs (mmcblk0p3): invalid media value (0x1f)
FAT-fs (mmcblk0p3): Can't find a valid FAT filesystem
NET: Registered protocol family 10
ALSA: Restoring mixer settings...
Configuring network interfaces... davinci_mdio davinci_mdio.0: resetting idled c
ontroller
net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:07, id=7c0f1)
ADDRCONF(NETDEV_UP): eth0: link is not ready
eth0 no wireless extensions.

udhcpc (v1.13.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Setting up IP spoofing protection: rp_filter.
Tue Apr 10 18:57:00 UTC 2012

  • Dear Libin Xie,

    your Linux file system on the SD-card is corrupted. The same thing happened to me. If you boot from the SD-card and don't shutdown properly using the command:

    target $ shutdown –h now

    in the terminal you corrupt the file system. I could boot Linux exactly once from the SD-card since I didn't know the right shutdown arguments at that moment.

    Unfortunately I'm trying for days to figure out how to flash a new image to (another) SD-card. This isn't that easy if you are no Linux expert. My problem is that the tool chain is just supporting Ubuntu 10.04 but I can't have network access with this version, just the newer releases like 12.04. Unforunately the TI Linux toolschains for OMAP-L138 aren't supported here, the software can't even be installed.

    The cheapest version (not kidding) is to get another hardware (this is just $ 195) which comes with another SD-card. Trying to figure out for days how to repair the SD-card took me days without being successful. In my previous company I followed this way very often by ordering each embedded Linux board twice since the first boot ended with some problems. Creating an image of the SD-cards often failed as well.

    Sorry for not helping you too much,

    Christian

  • Dear Libin Xie,

    yesterday I devoted some to to create a new SD card for the OMAP-L138 LCDK. Following the steps listed below should also work for you:

    You can place all the three required files 'u-boot.bin', 'omapl138-lcdk-fs.tar.gz' and 'uImage' to a convenient location that you can find with your terminal easily. They can be found in the 'ti-sdk-omapl138-lcdk-01.00.00.bz2' and 'DaVinci-PSP-SDK-03.20.00.03' you can find here: http://www.ti.com/tool/linuxsdk-omapl138 and here: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/LinuxPSP/DaVinci_03_20/index.html.

    1.) Take a new unformatted SD card at best. If you have any partitions on a used one they won't be acessable since the partition table will be corrupted by writing u-boot.bin to it. 

    2.) Run the 'gparted' tool using a Linux machine. If you don't find 'gparted' on it install it by entering 'sudo apt-get install gparted' in a terminal.

    3.) Run 'gparted' by entering 'sudo gparted'.

    4.) Check for the SD card directories. They should be under 'sdb'. Make sure not to corrupt your Linux installation drive - in my case it is 'sda'. Delete all partitions you find on the SD card by using the 'delete' icon.

    5.) Click the the green hook for 'Apply All Operations' and close 'gparted'.

    6.) Eject and insert the SD card again.

    7.) Write u-boot.bin to the SD card. Run 'sudo dd if=u-boot.bin of=/dev/media

    8.) Install the first partition for Linux kernel on the SD card. Run 'gparted' again. Click into the free space and click the 'New' (+) icon. Select 'Free Space Preceeding' 256kByte and 'New Size' 256kByte as well. Select 'Create As' 'Primary partition' and 'Filesystem' 'fat32'. Enter 'kernel' for 'Label'.

    9.) Install a second partition for the Linux file system named 'rootfs' using 'gparted' as well. Click into the remaining free space and click the 'New' (+) icon. Select 'Free Space Preceeding' 0kByte and leave the rest of the SD card for 'New Size'. Select 'Create As' 'Primary partition' again and 'Filesystem' 'ext3' now. Enter 'rootfs' for 'Label'.

    10.) Click the the green hook for 'Apply All Operations' and close 'gparted' again. Wait until the partition of the SD card have completed. Eject and remout again.

    11.) In the terminal move to the 'rootfs' partition by entering 'sudo cd /media/rootfs' and delete the 'lost+found' directory by entering 'sudo rm -r *'.

    12.) From your 'home' directory or wherever you placed your files copy them to the SD card directories by 'sudo cp uImage /media/kernel' and 'sudo cp omapl138-lcdk-fs.tar.gz /media/rootfs'.

    13.) I untared the 'rootfs' files by changing to /media/rootfs and entering 'sudo tar zxvf omapl138-lcdk-fs.tar.gz'. It takes a while until all files are uncompressed.

    14.) Now insert the SD card into the card reader. Open a Terminal session on your host computer to the OMAP-L138 LCDK. Power the board. Now u-boot should run and load and uncompress the Linux kernel and mount the file system. When the prompt appears (this may take some minutes) enter the 'root' password. Since 'ls' doesn't show and files move two levels backward by entering 'cd ..' two times to reach the 'root'. 'ls' shows you the file system now.

    15.) Before unpowering or resetting the system enter 'shutdown -h now' in the terminal and wait until all processes have stopped, the file system is unmounted. Now you can remove the SD card savely.

    Hope I could help you.

    Christian

    Christian

  • Dear Libin Xie,

    by the way I could repair my LCDK SD-card using this method:

    - In the Linux terminal you use the 'demesg' instruction that echoes the device names. You will get the unmounted unchecked fs on the SD-card (sdb1 for instance) with the recommendation to run 'e2fsk'.

    - next unmount the SD-card using the name of the card (sdb1 in my case):

    umount  /dev/sdb1

    - now run 'e2fsk' ('fsk.ext2' should work as well). You need superuser rights to do so:

    sudo e2fsk  /dev/sdb1

    - you have to accept several messaged questions by typing 'y' and be patient for a while. After this procedure I could read the fs successfully from the SD-card again.

    Hope this helps

    With best regards

    Christian