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.

kernel panic while flashing ramdisk/jffs2 from u-boot

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

Hi,

I am trying to load the ramdisk.gz(from the DaVinci-PSP-SDK-03.20.00.08 package) to my customized AM1707 board which is pin to pin compatible with OMAPL137

 

case1: ramdisk

--------------------------

The package contains two filesystem images viz. ramdisk-base.gz(3.1MB) and ramdisk.gz(12MB) , we have loaded ramdisk-base.gz successfully with the following u-boot environment variables set:

I have used ymodem to load the filesystem and uImage to the board , since there was some problem with the ethernet hardware.

setenv bootcmd 'nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=off

After the above steps i successfully booted the kernel.


But , when i used the other the complete ramdisk.gz (12MB) then i saw that kernel does not come up. It is giving the following error

oading from NAND 512MiB 3,3V 8-bit, offset 0x200000
   Image Name:   Linux-2.6.33-rc4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1989996 Bytes =  1.9 MB
   Load Address: c0008000

   Entry Point:  c0008000
## Booting kernel from Legacy Image at c0700000 ...
   Image Name:   Linux-2.6.33-rc4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1989996 Bytes =  1.9 MB

   Load Address: c0008000
   Entry Point:  c0008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.33-rc4 (x0029463@psplinux051) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 PREEMPT Tue Nov 9 18:0

CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA830/OMAP-L137/AM17xx EVM
Memory policy: ECC disabled, Data cache writethrough
DaVinci da830/omap-l137 rev2.0 variant 0x9

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=off
PID hash table entries: 128 (order: -3, 512 bytes)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 24148KB available (3764K code, 296K data, 140K init, 0K highmem)

SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 227.73 BogoMIPS (lpj=1138688)

Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 128 gpio irqs
NET: Registered protocol family 16
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
pcf857x: probe of 1-003f failed with error -121
Switching to clocksource timer0_0
musb_hdrc: version 6.0, cppi4.1-dma, host, debug=0

Waiting for USB PHY clock good...
musb_hdrc: USB Host mode controller at fee00000 using DMA, IRQ 58
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...

rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 4096K
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 55
io scheduler noop registered (default)

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
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
Using RX channel = 14 , TX channel = 15 and event queue = 1

m25p80 spi0.0: non-JEDEC variant of w25x32
m25p80 spi0.0: w25x32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "U-Boot"
0x000000040000-0x000000044000 : "U-Boot Environment"

0x000000044000-0x000000400000 : "Linux"
spi_davinci spi_davinci.0: Controller at 0xfec41000
console [netcon0] enabled
netconsole: network logging started
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 2
ohci ohci.0: irq 59, io mem 0x01e25000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
tsc2004: probe of 1-0049 failed with error -121
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected

i2c /dev entries driver
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
watchdog watchdog: heartbeat 60 sec
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode

usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
usbcore: registered new interface driver snd-usb-audio
No device for DAI tlv320aic3x

asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DA830/OMAP-L137 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused aemif
Clocks: disable unused emac

davinci_emac_probe: using random MAC addr: fe:10:18:90:a6:6c
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
RAMDISK: gzip image found at block 0
RAMDISK: EOF while reading compressed data

uncompression error
EXT2-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 140K
EXT2-fs (ram0): error: ext2_lookup: deleted inode referenced: 4001

Warning: unable to open an initial console.
EXT2-fs (ram0): error: ext2_lookup: deleted inode referenced: 4009
EXT2-fs (ram0): error: ext2_lookup: deleted inode referenced: 4005
Kernel panic - not syncing: Attempted to kill init!

Backtrace:
[<c002f718>] (dump_backtrace+0x0/0x114) from [<c02f32f4>] (dump_stack+0x18/0x1c)
 r7:c1c20000 r6:c1c20000 r5:000c72bc r4:c0403ab8
[<c02f32dc>] (dump_stack+0x0/0x1c) from [<c02f335c>] (panic+0x64/0x13c)

[<c02f32f8>] (panic+0x0/0x13c) from [<c00427dc>] (do_exit+0x74/0x6b4)
 r3:c03e1160 r2:00000000 r1:c1c23f60 r0:c0382dc0
[<c0042768>] (do_exit+0x0/0x6b4) from [<c0042ee4>] (do_group_exit+0xc8/0xfc)

[<c0042e1c>] (do_group_exit+0x0/0xfc) from [<c0042f30>] (sys_exit_group+0x18/0x24)
 r5:000c72bc r4:000c72e0
[<c0042f18>] (sys_exit_group+0x0/0x24) from [<c002bf20>] (ret_fast_syscall+0x0/0x28)



Please let us know whether our environment variable setting is wrong. It would be great if you can send us the correct u-boot bootargs and bootcmd settings.

case2 : using JFFS2
-----------------------------
Incase of using jffs2 iam getting the following error

setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=off

error is as follows ( i have not copied the complete boot up log ,only the error is copied at the tail end)
............................
ALSA device list:
#0: DA830/OMAP-L137 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused emac
davinci_emac_probe: using random MAC addr: 0e:8b:69:db:50:cb
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)


Please suggest the solution in case of ramdisk or jffs2. We are looking to flash either using jffs2 or ramdisk

thanks
lokesh



  • The ramdisk case. I would guess increasing the sizes to 12MB(0xC00000) should work:
    setenv bootcmd 'nand read.e 0xc1180000 0x400000 0xC00000; nboot.e 0xc0700000 0 0x200000; bootm'
    setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,12M ip=off

    In the jffs2 case, try adding rootwait to bootargs. The MTD driver may not be up yet. MTD messages should show up in the boot log. If they occur before the VFS mount, it is some other problem.
    setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=off rootwait

  • Hi Norman,

    I knew this post has been for a while ago. I searched my problem on this forum and could not find a solution to my problem and see you have some posts related to my issue such as this one. I am asking for help form you.

    My problem is the board cannot boot up from SPI_Flash.

    According to LogicPD's document that OMAPL-138 eXperimenter Kit cant be set to boot up from SPI Flash. There are four files are used. They are "arm-spi-ais.bin" " u-boot.bin", "uImage", and "ramdisk-base.gz". I followed all steps as the document does.

    My U-boot environments is here

    bootdelay=3
    baudrate=115200
    bootfile="uImage"
    dnsip=192.168.111.236
    ethaddr=00:08:EE:04:9C:5B
    filesize=301325
    fileaddr=C1180000
    netmask=255.255.255.0
    ipaddr=192.168.111.131
    serverip=192.168.111.226
    bootcmd=sf probe 0; sf read 0xC0700000 0x80000 0x200000;sf read 0xC1180000 0x280000 0x400000;bootm 0xC07
    00000
    bootargs=mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xC1180000,8m ip=off
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 2009.11 (May 03 2010 - 15:38:40)

    Environment size: 479/65532 bytes

    After power on, the screen has

    Booting with TI UBL

    Device OPP (300MHz, 1.2V)

    U-Boot 2009.11 (May 03 2010 - 15:38:40)

    I2C: ready
    DRAM: 64 MB
    In: serial
    Out: serial
    Err: serial
    ARM Clock : 300000000 Hz
    DDR Clock : 132000000 Hz
    Net: Ethernet PHY: GENERIC @ 0x00

    Hit any key to stop autoboot: 0
    8192 KiB M25P64 at 0:0 is now current device
    ## Booting kernel from Legacy Image at c0700000 ...
    Image Name: Linux-2.6.32-rc6
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 1912980 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.

    As you the boot up stop at booting the kernel.

    LogicPD believes my bootargs has wrong, but I couldn't see. Would you help to take look my bootargs if it is wrong.

    Thank you


    Joe

  • It has been a while since I dealt with embedded Linux. From what I remembered, your boot log looks good. Just that you don't see any console output. The "Uncompressing Linux... done, booting the kernel." line comes from the mini-bootloader within uImage. So the first bit of uImage ran sucessfully. At very least you should see the linux boot banner. Hard to tell if it is loading up the ramdisk yet. Maybe try adding "earlyprintk" to the bootargs. Are you sure the console is ttyS2? Later TI kernels changed the name to ttyO2 ( 'O' are in Omap).

  • Thank you, Norman, for quickly replying even thought I still have not figured out what problem is.

    The console is ttyS2 according to LogicPD's document. The kernel and uboot images all come form LogicPD.

    Your suggestion to add "earlyprintk", I added it on and the bootargs like this

    setenv bootargs 'mem=32M console=ttyS2,115200n8 earlyprintk=serial,ttyS2,115200n8 root=/dev/ram0 rw initrd=0xC1180000,8m ip=off

    No any extra message print out.'

    I also tried ttyO2, but all have same result.

    O, BTW, the logicPD's document is "1015906B_OMAP-L138_AM1808_U-Boot_Labs.pdf"

    I do changed above 8m on the bootargs from 4m. But no different.

    Joe


  • You have to be registered with LogicPD to look at most of their documents. My experience has been with the Spectrum Digital and LCDK boards. Never been a reason for to register. I'm out of ideas anyways. A bit of searching and this persons seems to have a simillar problem:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/139578.aspx

    He's on a custom board though.He's found a UART baud problem. I believe the first lines of console print to the serial port with the assumption that u-boot has setup the UART. Later console prints will use the serial driver that will reinit the UART.

    I usually use earlyprintk by itself with no parameters.

    I assume that you got the u-boot file and uImage from the same release. This should mean that the mach id is the same in the two. If they don't match, the kernel will stop loading. Usually an error message is printed.

    Others have posted a problem where the silcon rev is too new for the kernel. The kernel will stop loading. Usually an error message is printed here as well. Maybe try using a newer release.

  • Hi Norman,

    Thank you for replying. It helps me. Based on your input on suspecting on UART. I do find the baudrate is only half of what it should be. Since I used the image file from LogicPD provided and don't know what source it was based, therefor, I use my own build u-boot and uImage. also made size adjusted. It works now. Thank you for help.

    I do feel it is not convenient to access files have to be registered users, but I do register, however, the main problem is that less supported.

    Joe