• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Kernel panic - not syncing: No init found  (Read 14813 times)
mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« on: April 25, 2009, 08:06:06 AM »

Hi all,

I just received my brand new sheevaplug.
Unfortunately, it did not boot when I first plugged it :
Verifying Checksum ... Bad Data CRC

So I'm trying to reflash the NAND with ubuntu jaunty.
I followed the documentation "SheevaPlug Development Kit - Writing Jaunty Filesystem on the NAND flash-Rev1.2.pdf" found on the website :
- start the sheevaplug via NFS
- flash uImage and jffs2
- reset
- reconfigure to boot from NAND
- reset

The checksum is correct and ubuntu boots... but it stops with the following message :
Code:
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
(see full log below)

I found a few related posts here (http://openplug.org/plugforum/index.php?topic=133.0 and http://openplug.org/plugforum/index.php?topic=139), saying that it might come from a corrupted jffs2 file.
So I tried to use several versions of the ubuntu-9.0.5.Release.jffs2 file :
- the one available on the website (v1.2). By the way, it now gives a 404
- the one available from the provided CDROM (v1.1)
- the one downloaded from http://djpandemonium.com/plug/SheevaPlug_FileSystem.zip
- one that I downloaded a while ago, named ubuntu-9.0.4.Release.jffs2 (v1.0)

All these versions gave the same result.

I also tried to add init=/sbin/init or init=/bin/bash in the bootargs :
Code:
Warning: unable to open an initial console.
Failed to execute /bin/bash.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.


Any help would be appreciated.

Here are the commands I used to boot from NFS :
Code:
set console 'console=ttyS0,115200 mtdparts=:0x100000@0x000000(u-boot),0x300000@0x100000(uImage),0x1fc00000@0x400000(rootfs)rw'
set bootargs_root 'root=/dev/nfs rw'
set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
saveenv
reset
Tha commands I used to flash :
Code:
flash_eraseall /dev/mtd1
flash_eraseall -j /dev/mtd2
nandwrite p /dev/mtd1 uImage.sheeva.040309
nandwrite p /dev/mtd2 ubuntu-9.0.5.Release.jffs2
mount -t jffs2 /dev/mtdblock2 /mnt1
And the commands I used after the flash :
Code:
setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fC00000@0x400000(rootfs)rw root=/dev/mtdblock2'
setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; bootm 0x800000'
saveenv
reset


Here is the full boot log :
Code:
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x3ff800 -- 100% complete.
 3145728 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-04-04   1:49:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2070252 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.22.18 (root@localhost.localdomain) (gcc version 4.2.0 20070413 (prerelease)) #1 Fri Apr 3 18:49:38 PDT 2009
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists.  Total pages: 130048
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fC00000@0x400000(rootfs)rw root=/dev/mtdblock2 init=/bin/bash
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB 0MB 0MB = 512MB total
Memory: 515584KB available (3772K code, 258K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 256MB
SDRAM_CS1 ....base 10000000, size 256MB
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_4.2.7_patch2)-- SHEEVA PLUG  Soc: 88F6281 A0 LE

 Detected Tclk 200000000 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c08b0600
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c00117e4)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
Warning: TS unit is powered off.
MV Buttons Driver Load
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 20 RAM disks of 4096K size 4096 blocksize
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload enabled
  o Receive checksum offload enabled
  o Transmit checksum offload enabled
  o Network Fast Processing (Routing) supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Proc tool API enabled
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
    o eth0, ifindex = 1, GbE port = 0
    o eth1, ifindex = 2, GbE port = 1

mvFpRuleDb (dfd20000): 16384 entries, 65536 bytes
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation

Warning Sata is Powered Off
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 55 at 0x006e0000
Bad eraseblock 214 at 0x01ac0000
Bad eraseblock 228 at 0x01c80000
Bad eraseblock 444 at 0x03780000
Bad eraseblock 484 at 0x03c80000
Bad eraseblock 582 at 0x048c0000
Bad eraseblock 615 at 0x04ce0000
Bad eraseblock 1004 at 0x07d80000
Bad eraseblock 1121 at 0x08c20000
Bad eraseblock 1264 at 0x09e00000
Bad eraseblock 1394 at 0x0ae40000
Bad eraseblock 1545 at 0x0c120000
mtd: bad character after partition (r)
3 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00400000 : "uImage"
0x00400000-0x20000000 : "rootfs"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux telephony interface: v1.00
Marvell Telephony Driver:
mvBoardVoiceAssembleModeGet: TDM not supported(boardId=0x9)
assembly=-1,irq=-1
mp_check_config: Error, invalid voice assembley mode
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int32x1     97 MB/s
raid6: int32x2    123 MB/s
raid6: int32x4    126 MB/s
raid6: int32x8    111 MB/s
raid6: using algorithm int32x4 (126 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
   arm4regs  :  1084.000 MB/sec
   8regs     :   754.800 MB/sec
   32regs    :   899.600 MB/sec
raid5: using function: arm4regs (1084.000 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mvsdmmc: irq =28 start f1090000
mvsdmmc: no IRQ detect
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
mvCLAudioCodecRegGet: Error while reading register!
mvCLAudioCodecInit: Error - Invalid Cirrus Logic chip/rev ID!
Error - Cannot initialize audio decoder.at address =0xff<6>ALSA device list:
  #0: Marvell mv88fx_snd ALSA driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #1 on: April 25, 2009, 08:18:29 AM »

Based on the "Writing Jaunty Filesystem" doc you don't use "-p" when writing the jffs2 partition.  You do use it to write the kernel image.
Logged

mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« Reply #2 on: April 25, 2009, 10:48:00 AM »

Thanks for your answer.

I checked again the "Writing Jaunty Filesystem" documentation from http://www.marvell.com/files/products/embedded_processors/developer/kirkwood/SheevaPlug_DocumentationPackage.zip (it's currently Rev1.2)
On page 5, it seems to use -p for both nandwrite commands.
But you're right, on previous versions of this document, the -p option was not used to flash the jffs2.

I tried :
Code:
nandwrite p /dev/mtd1 uImage.sheeva.040309
nandwrite /dev/mtd2 ubuntu-9.0.5.Release.jffs2
It gave me the same behavior.

I also tried :
Code:
nandwrite /dev/mtd1 uImage.sheeva.040309
nandwrite -p /dev/mtd2 ubuntu-9.0.5.Release.jffs2
It failed for uImage with message :
Code:
Input file is not page aligned
Data was only partially written due to error
: Success
So it ends up with a "Bad Magic Number" when trying to boot on the NAND.
« Last Edit: April 25, 2009, 11:04:25 AM by mossroy » Logged

mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« Reply #3 on: April 25, 2009, 11:45:44 AM »

I managed to make ubuntu boot correctly!
I simply applied the instructions of the previous version of documentation : Rev1.0, instead of Rev1.2

I'll try to find out which exact command was wrong...
Logged

mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« Reply #4 on: April 25, 2009, 01:40:33 PM »

The problem was apparently coming from the commands after the flash.
If I use the commands from Rev1.0, I can boot correctly :

Code:
setenv bootargs 'console=ttyS0,115200 mtdparts=nand_flash:0x400000@0x100000(uImage)ro,0x1fC00000@0x500000(rootfs)rw root=/dev/mtdblock2'
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv
reset

This worked with the jffs2 posted at http://djpandemonium.com/plug/SheevaPlug_FileSystem.zip

With the latest file downloaded from the website (v1.2), the mount gave me this error :
Code:
JFFS2 notice: (294) check_node_data: wrong data CRC in data node at 0x00069000: read 0xc5585480, calculated 0xa78a6243.
JFFS2 warning: (294) jffs2_do_read_inode_internal: Truncating ino #22 to 30236 bytes failed because it only had 16384 bytes to start with!

For now, I'll keep the jffs2 of pandemonium (thank you), and try to upgrade ubuntu to final version.
Logged

Pages: [1]
Print
Jump to: