Kernel panic - not syncing: Attempted to kill init!

1,778 views
Skip to first unread message

anddev

unread,
Aug 24, 2010, 4:58:01 AM8/24/10
to Android Linux Kernel Development
Hi All,
I have downloaded kernel/common.git from android git server and
linux-2.6.35 branch, I am trying to port this kernel with froyo on my
hardware.
i the kernel i have only ported serial (UART) driver along with MTD
driver (which is onenand device in this case). I dont have any
framebuffer or console driver ready yet.
I have build the froyo and i am using yaffs2 filesystem.
when i booted i got
Kernel panic - not syncing: Attempted to kill init!
i wanted to debug this problem but do not know where to start.
my question is, what is the reason for init to fail?
Do i need some other driver like frame-buffer or console driver to be
ported first?
my requirement is to get the Android (linux) prompt not the android
GUI or so.
and also tell me how to debug the init of android? i increase the
loglevel to 6 in init.rc but it doesnt help.

Appreciate any input on this, below are the kernel log:

******************

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.35-dirty (laptop@Linux) (gcc version
4.4.1 (Sourcery G++ Lite 2009q3-67) ) #1 PREEMPT Tue Aug 24 16:55:47
PST 2010
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7
(ARMv7), cr=00c5387f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[ 0.000000] Machine: MyMachine
[ 0.000000] Ignoring unrecognised tag 0x00000000
[ 0.000000] Ignoring unrecognised tag 0x41001099
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 65024
[ 0.000000] Kernel command line: console=ttySEC1,115200
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5,
131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536
bytes)
[ 0.000000] Memory: 256MB = 256MB total
[ 0.000000] Memory: 256628k/256628k available, 5516k reserved, 0K
highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xff600000 - 0xffe00000 ( 8 MB)
[ 0.000000] vmalloc : 0xd0800000 - 0xe0000000 ( 248 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc005f000 ( 348 kB)
[ 0.000000] .text : 0xc005f000 - 0xc0237000 (1888 kB)
[ 0.000000] .data : 0xc025e000 - 0xc02753c0 ( 93 kB)
[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0,
CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU-based detection of stalled CPUs is disabled.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.000000] NR_IRQS:144
[ 0.000000] VIC @f4000000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f4010000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f4020000: id 0x00041192, vendor 0x41
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttySEC1] enabled
[ 0.015000] Calibrating delay loop... 665.19 BogoMIPS (lpj=1662976)
[ 0.125000] pid_max: default: 32768 minimum: 301
[ 0.125000] Mount-cache hash table entries: 512
[ 0.130000] Initializing cgroup subsys cpuacct
[ 0.135000] Initializing cgroup subsys freezer
[ 0.140000] CPU: Testing write buffer coherency: ok
[ 0.150000] XXXXX: Initializing architecture
[ 0.170000] bio: create slab <bio-0> at 0
[ 0.185000] Loaded driver for PL330 DMAC-1 s3c-pl330
[ 0.185000] DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
[ 0.200000] ashmem: initialized
[ 0.230000] ROMFS MTD (C) 2007 Red Hat, Inc.
[ 0.235000] YAFFS2 filesystem
[ 0.240000] msgmni has been set to 501
[ 0.245000] io scheduler noop registered
[ 0.250000] io scheduler deadline registered
[ 0.255000] io scheduler cfq registered (default)
[ 0.890000] Serial: 8250/16550 driver, 3 ports, IRQ sharing
disabled
[ 0.895000] s5pv210-uart.0: s3c2410_serial0 at MMIO 0xec000000 (irq
= 16) is a S3C6400/10
[ 0.900000] s5pv210-uart.1: s3c2410_serial1 at MMIO 0xec000400 (irq
= 20) is a S3C6400/10
[ 0.910000] s5pv210-uart.2: s3c2410_serial2 at MMIO 0xec000800 (irq
= 24) is a S3C6400/10
[ 0.945000] brd: module loaded
[ 0.955000] loop: module loaded
[ 0.960000] OneNAND Driver.
[ 0.960000] OneNAND:onenand_probe - (Virt) Base Address: 0xD1000000
[ 0.965000] OneNAND Sync. Burst Read
[ 0.970000] Muxed OneNAND 512MB 1.8V 16-bit (0x50)
[ 0.975000] OneNAND version = 0x013e
[ 0.980000] Scanning device for bad blocks
[ 1.140000] Creating 6 MTD partitions on "onenand":
[ 1.140000] 0x000000000000-0x000000080000 : "bootloader"
[ 1.145000] 0x000000080000-0x000000180000 : "param"
[ 1.150000] 0x000000180000-0x000000780000 : "kernel"
[ 1.155000] 0x000000780000-0x000006b80000 : "system"
[ 1.165000] 0x000006b80000-0x00000bb80000 : "cache"
[ 1.165000] 0x00000bb80000-0x00000ed80000 : "userdata"
[ 1.175000] logger: created 64K log 'log_main'
[ 1.175000] logger: created 256K log 'log_events'
[ 1.180000] logger: created 64K log 'log_radio'
[ 1.185000] logger: created 64K log 'log_system'
[ 1.190000] VFP support v0.3: implementor 41 architecture 1 part 20
variant b rev 5
[ 1.200000] Warning: unable to open an initial console.
[ 1.200000] Freeing init memory: 348K
[ 1.210000] Kernel panic - not syncing: Attempted to kill init!
[ 1.210000] [<c0065f68>] (unwind_backtrace+0x0/0xf0) from
[<c01c0834>] (dump_stack+0x18/0x1c)
[ 1.215000] [<c01c0834>] (dump_stack+0x18/0x1c) from [<c01c08a0>]
(panic+0x68/0xe8)
[ 1.220000] [<c01c08a0>] (panic+0x68/0xe8) from [<c00831dc>]
(do_exit+0x74/0x5ec)
[ 1.225000] [<c00831dc>] (do_exit+0x74/0x5ec) from [<c00837ec>]
(do_group_exit+0x98/0xcc)
[ 1.230000] [<c00837ec>] (do_group_exit+0x98/0xcc) from
[<c008f0d8>] (get_signal_to_deliver+0x348/0x384)
[ 1.235000] [<c008f0d8>] (get_signal_to_deliver+0x348/0x384) from
[<c0062b74>] (do_signal+0x70/0x644)
[ 1.240000] [<c0062b74>] (do_signal+0x70/0x644) from [<c0063168>]
(do_notify_resume+0x20/0x50)
[ 1.245000] [<c0063168>] (do_notify_resume+0x20/0x50) from
[<c005ff50>] (work_pending+0x1c/0x20)
***************** end

mvniekerk

unread,
Aug 25, 2010, 5:12:20 AM8/25/10
to Android Linux Kernel Development
I'm busy with the same issue with froyo. What hardware are you using?
I'm using imx.31. My kernel boots up - crashes on init.
I'm looking into the eabi tuning (-march TARGET_CPU_ABI etc). I've
added printfs and fd-open-writes to the tty device in init.c (/system/
core/init/init.c:void main) -> no debug coming out.

All the android kernel ninjas, what is needed to just get Android's
init running?

Brad Davis

unread,
Aug 24, 2010, 9:05:08 PM8/24/10
to Android Linux Kernel Development


On Aug 24, 2:58 am, anddev <sj.and...@gmail.com> wrote:
> Hi All,
> I have downloaded kernel/common.git from android git server and
> linux-2.6.35 branch, I am trying to port this kernel with froyo on my
> hardware.
> i the kernel i have only ported serial (UART) driver along with MTD
> driver (which is onenand device in this case). I dont have any
> framebuffer or console driver ready yet.
> I have build the froyo and i am using yaffs2 filesystem.
> when i booted i got
>  Kernel panic - not syncing: Attempted to kill init!
> i wanted to debug this problem but do not know where to start.
> my question is, what is the reason for init to fail?
> Do i need some other driver like frame-buffer or console driver to be
> ported first?

Yes, you need the framebuffer running. Android is really a GUI system
running on top of a Linux kernel with a BSD userspace. One of the
first things that happens (after the kernel and init are running) is
start the GUI (i.e. Android). If the GUI fails, init dies and the
kernel halts (because there is no userland OS to run). The same would
happen on your favorite Unix/Linux/BSD system if init couldn't start
up the userspace OS.

You may be able to remove things from init.rc (note that the this is
not a Unix/Linux/BSD init) and put a shell in instead but then you
don't really have Android running, you just have a single user Linux
with a BSD userspace.

Brad

tek-life

unread,
Aug 26, 2010, 3:21:59 AM8/26/10
to Android Linux Kernel Development
Hi.Thanks for your answer.

And I also came across the same question .

I don't need GUI,just need a prompt.

And I have a try to write a init.c:

#include <unistd.h>
#include <linux/reboot.h>
int main(void)
{
reboot(RB_AUTOBOOT);//reboot the system.
return 0;
}

I use EABI crosschain compile it .and make a cpio-initrd image
file ,then launch the goldfish emulator to try it.

But ,There is nothing happened.No reboot,No output,No kernel panic.

anddev

unread,
Aug 26, 2010, 10:24:46 PM8/26/10
to Android Linux Kernel Development
Thanks Brad for the input,
Today i tried with a ramdisk image (bash shell) with the same kernel,
and it does boot till the linux prompt.
Now i can port frame-buffer and other drivers to bring Android on my
board.

Tek-life: you can also try the same, its the easiest way to keep
going.
build a ramdisk and change your kernel command line accordingly and
boot the kernel.

Have a look at Documentation/init.txt

sri

unread,
Aug 30, 2010, 12:05:06 AM8/30/10
to Android Linux Kernel Development
Hi,
Do logcat when it is stuck, den u'll get to know which module is it
failing in the log.
Sometimes if any of the module fails or if bootargs are not proper
also , u get init load error.


Regards,
sri.

anddev

unread,
Aug 30, 2010, 12:29:57 AM8/30/10
to Android Linux Kernel Development
Hi sri
can you tell me, how to execute logcat without the kernel prompt?

white

unread,
Sep 1, 2010, 12:53:43 AM9/1/10
to Android Linux Kernel Development
Please check the ramdisk.

kernel booting process check the init process,
but if your system does not involve the init process in ramdisk,
kernel prints that message.

kerenl check the "/", "/sbin", "/usr/bin/" and then prints that
message.

Android usally /init process..^^
> > sri.- 원본 텍스트 숨기기 -
>
> - 원본 텍스트 보기 -

joy

unread,
Sep 14, 2010, 5:07:30 AM9/14/10
to Android Linux Kernel Development
have checked with ur <....>/arch/arm/boot/compress/head.S and misc.c
this two file is responsible for uncompression
Reply all
Reply to author
Forward
0 new messages