Error in booting(DD-WRT) -- need help

3 posts / 0 new
Last post
Subhra
Subhra's picture
Error in booting(DD-WRT) -- need help

Hi all,
I am using DD-WRT-SP1-V24 with Linux-2.6.34.6. When I try to boot the compiled firmware image, it gives the following error:

"Kernel panic - not syncing: No init found. Try passing init= option to kernel"

The corresponding bootlog is shown below.

I am using uboot as bootloader.From this bootlog it can be seen that rootfs is mounted properly also there is no messege related to inital console failure.I cannot get any clue what the problem is.
Please help me out.

Thanks in advance.

 

==================================BOOT LOG=====================================

U-Boot 1.1.4 (Oct 29 2010 - 14:27:1Cool

U-boot 0.0.12 dni13 V0.3
DRAM: b8050000: 0xc0140180
64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 259k for U-Boot at: 83fbc000
Reserving 192k for malloc() at: 83f8c000
Reserving Bytes for Board Info at: 83f8bfd4
Reserving 36 Bytes for Global Data at: 83f8bfb0
Reserving 128k for boot params() at: 83f6bfb0
Stack Pointer at: 83f6bf98
Now running in RAM - U-Boot at: 83fbc000
id read 0x100000ff
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: ag7100_enet_initialize...
CHH:mac: 0 if: 2
CHH:mac:verify: 0 if: 00000002
: cfg1 0xf cfg2 0x7014
in rtl8366s_phy_setup mac=-1543912652
after rtl8366s_initChip ret=0
eth0: e0:91:f5:c9:8f:a3
eth0 up
CHH:mac: 1 if: 1
CHH:mac:verify: 1 if: 00000001
: cfg1 0xf cfg2 0x7014
in rtl8366s_phy_setup mac=-1543912172
eth1: e0:91:f5:c9:8f:a4
eth1 up
eth0, eth1
Trying eth0
: unit 0 phy is up...RGMii 1000Mbps full duplex
#259:ag7100_set_mac_from_link
: pll reg 0x18050010: 0x11110000
: cfg_1: 0x1ff0000
: cfg_2: 0x3ff
: cfg_3: 0x8001ff
: cfg_4: 0xffff
: cfg_5: 0xfffef
: done cfg2 0x7215 ifctl 0x40605060 miictrl 0x22

Client starts...[Listening] for ADVERTISE...TTT
Retry count exceeded; boot the image as usual

nmrp server is stopped or failed !
Hit any key to stop autoboot: 0
Verifying Checksum ... OK
### SQUASHFS loading 'image/uImage' to 0x80800000
### SQUASHFS load complete: 1046684 bytes loaded to 0x80800000
## Booting image at 80800000 ...
Image Name: Linux Kernel Image
Created: 2011-03-17 9:10:40 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1046620 Bytes = 1022.1 kB
Load Address: 80002000
Entry Point: 80006710
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80006710) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[ 0.000000] Linux version 2.6.34.8-svn16243 ([email protected]) (gcc version 4.1.2) #24 Thu Mar 17 14:38:05 IST 2011
[ 0.000000] flash_size passed from bootloader = 16
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] booting platform Atheros AR7161 rev 2 (0xaa)
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00004000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00004000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs noinitrd init=/sbin/init
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 61692k/65536k available (2241k kernel code, 3844k reserved, 557k data, 148k init, 0k highmem)
[ 0.000000] NR_IRQS:128
[ 0.000000] irq init done
[ 0.000000] plat_time_init: plat time init done
[ 0.000000] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[ 0.250000] Mount-cache hash table entries: 512
[ 0.250000] NET: Registered protocol family 16
[ 3.250000] registering PCI controller with io_map_base unset
[ 3.260000] bio: create slab <bio-0> at 0
[ 3.270000] usbcore: registered new interface driver usbfs
[ 3.270000] usbcore: registered new interface driver hub
[ 3.280000] usbcore: registered new device driver usb
[ 3.340000] no in flash calibration fata found, no fix required
[ 3.400000] no in flash calibration fata found, no fix required
[ 3.410000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[ 3.410000] pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff] (PCI address [0x10000000-0x1000ffff]
[ 3.420000] pci 0000:00:01.0: BAR 0: assigned [mem 0x10010000-0x1001ffff]
[ 3.420000] pci 0000:00:01.0: BAR 0: set to [mem 0x10010000-0x1001ffff] (PCI address [0x10010000-0x1001ffff]
[ 3.430000] fixup irq: got 48
[ 3.430000] fixup irq: got 49
[ 3.430000] Switching to clocksource MIPS
[ 3.440000] NET: Registered protocol family 2
[ 3.440000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 3.450000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 3.460000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 3.460000] TCP: Hash tables configured (established 2048 bind 2048)
[ 3.470000] TCP reno registered
[ 3.470000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 3.480000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 3.480000] NET: Registered protocol family 1
[ 3.490000] gpio_proc: module loaded and /proc/gpio/ created
[ 3.490000] wl0gpio_proc: module loaded and /proc/wl0gpio/ created
[ 3.500000] AR7100 GPIOC major 0
[ 3.500000] init_vdso successfull
[ 3.510000] squashfs: version 3.0 (2006/03/15) Phillip Lougher
[ 3.510000] msgmni has been set to 120
[ 3.520000] io scheduler noop registered
[ 3.520000] io scheduler deadline registered (default)
[ 3.530000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 3.530000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 19) is a 16550A
[ 3.540000] console [ttyS0] enabled, bootconsole disabled
[ 3.540000] console [ttyS0] enabled, bootconsole disabled
[ 3.550000] guessed flashsize = 16M
[ 3.560000] scanning for root partition
[ 3.560000] uboot detected
[ 3.560000] bootloader size = 70000
[ 3.570000]
[ 3.570000] found squashfs at 170000
[ 3.580000] Creating 8 MTD partitions on "ar7100-nor0":
[ 3.580000] 0x000000000000-0x000000070000 : "uboot"
[ 3.590000] 0x000000070000-0x000001000000 : "linux"
[ 3.590000] 0x000000170000-0x0000002b0000 : "rootfs"
[ 3.600000] mtd: partition "rootfs" set to be root filesystem
[ 3.600000] 0x0000002b0000-0x000000fe0000 : "ddwrt"
[ 3.610000] 0x000000fe0000-0x000000ff0000 : "nvram"
[ 3.620000] 0x000000ff0000-0x000001000000 : "FIS directory"
[ 3.620000] 0x000000ff0000-0x000001000000 : "board_config"
[ 3.630000] 0x000000000000-0x000001000000 : "fullflash"
[ 3.630000] PPP generic driver version 2.4.2
[ 3.640000] PPP Deflate Compression module registered
[ 3.640000] PPP BSD Compression module registered
[ 3.650000] PPP MPPE Compression module registered
[ 3.650000] NET: Registered protocol family 24
[ 3.660000] PPPoL2TP kernel driver, V1.0
[ 3.660000] IMQ driver loaded successfully.
[ 3.670000] Hooking IMQ before NAT on PREROUTING.
[ 3.670000] Hooking IMQ after NAT on POSTROUTING.
[ 3.680000] tun: Universal TUN/TAP device driver, 1.6
[ 3.680000] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 3.690000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.590000] ar71xx-ehci ar71xx-ehci.0: Atheros AR71xx built-in EHCI controller
[ 5.600000] ar71xx-ehci ar71xx-ehci.0: new USB bus registered, assigned bus number 1
[ 5.640000] ar71xx-ehci ar71xx-ehci.0: irq 3, io mem 0x1b000000
[ 5.660000] ar71xx-ehci ar71xx-ehci.0: USB 2.0 started, EHCI 1.00
[ 5.660000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 5.670000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.680000] usb usb1: Product: Atheros AR71xx built-in EHCI controller
[ 5.680000] usb usb1: Manufacturer: Linux 2.6.34.8-svn16243 ehci_hcd
[ 5.690000] usb usb1: SerialNumber: platform
[ 5.690000] hub 1-0:1.0: USB hub found
[ 5.700000] hub 1-0:1.0: 2 ports detected
[ 5.700000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.710000] ar71xx-ohci ar71xx-ohci.0: Atheros AR71xx built-in OHCI controller
[ 5.720000] ar71xx-ohci ar71xx-ohci.0: new USB bus registered, assigned bus number 2
[ 5.720000] ar71xx-ohci ar71xx-ohci.0: irq 22, io mem 0x1c000000
[ 5.790000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.800000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.800000] usb usb2: Product: Atheros AR71xx built-in OHCI controller
[ 5.810000] usb usb2: Manufacturer: Linux 2.6.34.8-svn16243 ohci_hcd
[ 5.820000] usb usb2: SerialNumber: platform
[ 5.820000] hub 2-0:1.0: USB hub found
[ 5.820000] hub 2-0:1.0: 2 ports detected
[ 5.830000] usbcore: registered new interface driver usbserial
[ 5.840000] USB Serial support registered for generic
[ 5.840000] usbcore: registered new interface driver usbserial_generic
[ 5.850000] usbserial: USB Serial Driver core
[ 5.850000] USB Serial support registered for GSM modem (1-port)
[ 5.860000] usbcore: registered new interface driver option
[ 5.860000] option: v0.7.2:USB Driver for GSM modems
[ 5.870000] USB Serial support registered for pl2303
[ 5.870000] usbcore: registered new interface driver pl2303
[ 5.880000] pl2303: Prolific PL2303 USB to serial adaptor driver
[ 5.890000] USB Serial support registered for Sierra USB modem
[ 5.890000] usbcore: registered new interface driver sierra
[ 5.900000] sierra: v.1.7.16:USB Driver for Sierra Wireless USB modems
[ 5.900000] Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
[ 5.910000] u32 classifier
[ 5.920000] input device check on
[ 5.920000] Actions configured
[ 5.920000] Netfilter messages via NETLINK v0.30.
[ 5.930000] nf_conntrack version 0.5.0 (963 buckets, 3852 max)
[ 5.930000] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[ 5.940000] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
[ 5.950000] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[ 5.960000] nf_conntrack_rtsp v0.6.21 loading
[ 5.960000] nf_nat_rtsp v0.6.21 loading
[ 5.960000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 5.970000] IPP2P v0.8.2 loading
[ 5.970000] TCP bic registered
[ 5.980000] TCP cubic registered
[ 5.980000] TCP westwood registered
[ 5.980000] TCP highspeed registered
[ 5.990000] TCP hybla registered
[ 5.990000] TCP htcp registered
[ 5.990000] TCP vegas registered
[ 6.000000] TCP veno registered
[ 6.000000] TCP scalable registered
[ 6.000000] TCP lp registered
[ 6.010000] TCP yeah registered
[ 6.010000] TCP illinois registered
[ 6.010000] NET: Registered protocol family 17
[ 6.020000] 802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
[ 6.020000] All bugs added by David S. Miller <[email protected]>
[ 6.060000] Broken NVRAM found, recovering it (Magic FFFFFFFF)
[ 6.070000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 6.080000] Freeing unused kernel memory: 148k freed
[ 6.130000] Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init..
[ 6.150000] Rebooting in 5 seconds...

=================================================================================

 


Subhra
Subhra's picture
A little improvement in the

A little improvement in the status...
Here I am getting some new error message "Failed to execute /sbin/init. Attempting defaults..."

For this I did the following debuging.....

1.Thre is the binary of init exists in target/sbin directory in the following path--->

DD-WRT/src/router/mips-uclibc/target/sbin/init

2.The init binary's architecture matches the hardware.

init: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), not stripped

3. The required library dependencies of the init binary are ...

0x00000001 (NEEDED) Shared library: [libnvram.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]

All are present in the following paths-->

DD-WRT/src/router/mips-uclibc/target/lib/libnvram.so
DD-WRT/src/router/mips-uclibc/target/usr/lib/libutils.so
DD-WRT/src/router/mips-uclibc/target/lib/libc.so.0
DD-WRT/src/router/mips-uclibc/target/lib/libgcc_s.so.1

All the libraries are compiled for desired architecture...

target/lib/libnvram.so: ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), stripped
target/usr/lib/libutils.so: ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), not stripped
target/lib/libc.so.0: ELF 32-bit MSB shared object, MIPS, MIPS32 version 1 (SYSV), stripped
targat/lib/libgcc_s.so.1: ELF 32-bit MSB shared object, MIPS, MIPS32 version 1 (SYSV), not stripped

4. Tried to print kernel_execve()'s return value and it is -2, Which indicates that the cause of the problem is "No such file or directory".

Any help will be highly appreciated.

Subhra
Subhra's picture
The "Kernel panic - not

The "Kernel panic - not syncing: No init found" problem is solved....the libraries needed by init were not optimized. After proper optimization of the dependencies, init started to boot.

But now I am facing a new problem...execution of startservice is failed. In my distribution startservice is linked to rc(executable) and the rc has execution permission for user,owner and group.
After lot of debugging I found that system() is unable to execute startservice as it cannot find it, though it is present in /sbin/startservice.

The corresponding portion of the bootlog is shown below.
-------------------
start service
starting Architecture code..
[ 6.720000] Algorithmics/MIPS FPU Emulator v1.5
sh: startservice: Permission denied
sh: startservice: Permission denied
-------------------

Any help will be highly appreciated.