no output to serial console from /init process on ml405

7 messages, 3 authors, 2007-08-08 · open the first message on its own page

no output to serial console from /init process on ml405

From: Anton Kowalski <hidden>
Date: 2007-08-08 11:28:18

Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The kernel
boots fine but the init process does not produce any output. The /init
program resides in an initramfs file system and I believe the /dev
device files have been set up correctly. Here's an excerpt from my
initramfs specification:

    dir /dev 755 0 0
    nod /dev/console 644 0 0 c 5 1
    nod /dev/ttyS0 644 0 0 c 4 64

(I am able to open these files from the init program. I tested this by
sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and before
the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
IRQ sharing disabled
[    0.513862] serial8250.0: ttyS0 at MMIO 0x80201003 (irq = 3) is a 16550A
[    2.927509] RAMDISK driver initialized: 1 RAM disks of 8192K size
1024 blocksize
[    3.018391] tun: Universal TUN/TAP device driver, 1.6
[    3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice
[    3.218021] TCP cubic registered
[    3.257034] NET: Registered protocol family 1
[    3.309405] NET: Registered protocol family 17
[    3.363462] Freeing unused kernel memory: 300k init
[   23.488277] Kernel panic - not syncing: Attempted to kill init!
[   23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite driver
didn't work so I switched.) The kernel and the init program were
compiled with eldk.

Any insights into resolving this problem are greatly appreciated.


Anton

Re: no output to serial console from /init process on ml405

From: Wolfgang Reissnegger <hidden>
Date: 2007-08-08 15:36:33

Hi Anton,

it looks as if your init executable is not doing the right thing and for
some reason terminates. Maybe your inittab configuration is wrong? Maybe
the init executable has been compiled with the wrong options?

You can try to copy another executable (e.g. sh, getty) into /init and
see if you get any output. If you see anything doing that then most
likely there's something wrong with your init executable.

Wolfgang

Anton Kowalski wrote:
Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The kernel
boots fine but the init process does not produce any output. The /init
program resides in an initramfs file system and I believe the /dev
device files have been set up correctly. Here's an excerpt from my
initramfs specification:

    dir /dev 755 0 0
    nod /dev/console 644 0 0 c 5 1
    nod /dev/ttyS0 644 0 0 c 4 64

(I am able to open these files from the init program. I tested this by
sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and before
the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
IRQ sharing disabled
[    0.513862] serial8250.0: ttyS0 at MMIO 0x80201003 (irq = 3) is a 16550A
[    2.927509] RAMDISK driver initialized: 1 RAM disks of 8192K size
1024 blocksize
[    3.018391] tun: Universal TUN/TAP device driver, 1.6
[    3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice
[    3.218021] TCP cubic registered
[    3.257034] NET: Registered protocol family 1
[    3.309405] NET: Registered protocol family 17
[    3.363462] Freeing unused kernel memory: 300k init
[   23.488277] Kernel panic - not syncing: Attempted to kill init!
[   23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite driver
didn't work so I switched.) The kernel and the init program were
compiled with eldk.

Any insights into resolving this problem are greatly appreciated.


Anton
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

RE: no output to serial console from /init process on ml405

From: Benedict, Michael <hidden>
Date: 2007-08-08 16:26:05

Just a guess, but do you have stdout and friends defined as recommended
in the Compulsory links section of Documentation/devices.txt?
	-Michael
-----Original Message-----
From:=20
linuxppc-embedded-bounces+mbenedict=3Dtwacs.com@ozlabs.org=20
[mailto:linuxppc-embedded-bounces+mbenedict=3Dtwacs.com@ozlabs.o
rg] On Behalf Of Anton Kowalski
Sent: Wednesday, August 08, 2007 6:28 AM
To: linuxppc-embedded@ozlabs.org
Subject: no output to serial console from /init process on ml405
=20
Hi All:
=20
I'm trying to bring up linux 2.6.21.1 on an ml405 board. The kernel
boots fine but the init process does not produce any output. The /init
program resides in an initramfs file system and I believe the /dev
device files have been set up correctly. Here's an excerpt from my
initramfs specification:
=20
    dir /dev 755 0 0
    nod /dev/console 644 0 0 c 5 1
    nod /dev/ttyS0 644 0 0 c 4 64
=20
(I am able to open these files from the init program. I tested this by
sleeping for a specified time on success.)
=20
Also, printk continues to function after /init terminates and before
the kernel panics.
=20
Here are the last few lines of the console output:
=20
[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
IRQ sharing disabled
[    0.513862] serial8250.0: ttyS0 at MMIO 0x80201003 (irq =3D=20
3) is a 16550A
[    2.927509] RAMDISK driver initialized: 1 RAM disks of 8192K size
1024 blocksize
[    3.018391] tun: Universal TUN/TAP device driver, 1.6
[    3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice
[    3.218021] TCP cubic registered
[    3.257034] NET: Registered protocol family 1
[    3.309405] NET: Registered protocol family 17
[    3.363462] Freeing unused kernel memory: 300k init
[   23.488277] Kernel panic - not syncing: Attempted to kill init!
[   23.559517] Rebooting in 180 seconds..<NULL>
=20
I'm using the plb uart and the 8250.c driver. (The obp uartlite driver
didn't work so I switched.) The kernel and the init program were
compiled with eldk.
=20
Any insights into resolving this problem are greatly appreciated.
=20
=20
Anton
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
=20
=20

Re: no output to serial console from /init process on ml405

From: Anton Kowalski <hidden>
Date: 2007-08-08 16:28:15

Wolfgang,

Thanks, I'll try your suggestion.

It's worth noting that the init executable is calling into the kernel.

I put a printk in sys_write, which is on the call path of printf() and
the output is sent to the console. However, the output of printf is
not to be seen. This suggests the problem is perhaps in the serial
device setup?

Anton

On 8/8/07, Wolfgang Reissnegger [off-list ref] wrote:
Hi Anton,

it looks as if your init executable is not doing the right thing and for
some reason terminates. Maybe your inittab configuration is wrong? Maybe
the init executable has been compiled with the wrong options?

You can try to copy another executable (e.g. sh, getty) into /init and
see if you get any output. If you see anything doing that then most
likely there's something wrong with your init executable.

Wolfgang

Anton Kowalski wrote:
quoted
Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The kernel
boots fine but the init process does not produce any output. The /init
program resides in an initramfs file system and I believe the /dev
device files have been set up correctly. Here's an excerpt from my
initramfs specification:

    dir /dev 755 0 0
    nod /dev/console 644 0 0 c 5 1
    nod /dev/ttyS0 644 0 0 c 4 64

(I am able to open these files from the init program. I tested this by
sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and before
the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
IRQ sharing disabled
[    0.513862] serial8250.0: ttyS0 at MMIO 0x80201003 (irq = 3) is a 16550A
[    2.927509] RAMDISK driver initialized: 1 RAM disks of 8192K size
1024 blocksize
[    3.018391] tun: Universal TUN/TAP device driver, 1.6
[    3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice
[    3.218021] TCP cubic registered
[    3.257034] NET: Registered protocol family 1
[    3.309405] NET: Registered protocol family 17
[    3.363462] Freeing unused kernel memory: 300k init
[   23.488277] Kernel panic - not syncing: Attempted to kill init!
[   23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite driver
didn't work so I switched.) The kernel and the init program were
compiled with eldk.

Any insights into resolving this problem are greatly appreciated.


Anton
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: no output to serial console from /init process on ml405

From: Wolfgang Reissnegger <hidden>
Date: 2007-08-08 16:42:07

The thing that points to a problem with init is:
  Kernel panic - not syncing: Attempted to kill init!

What is the string that is supposed to be printed? Maybe the printf
tries to print a string at an invalid address, causing init to crash?

Also, you can check if you set the option for console on serial output:
  Location:
    -> Device Drivers
      -> Character devices
        -> Serial drivers
          -> 8250/16550 and compatible serial support (SERIAL_8250 [=y])

Cheers,
   Wolfgang

Anton Kowalski wrote:
Wolfgang,

Thanks, I'll try your suggestion.

It's worth noting that the init executable is calling into the
kernel.

I put a printk in sys_write, which is on the call path of printf()
and the output is sent to the console. However, the output of printf
is not to be seen. This suggests the problem is perhaps in the serial
 device setup?

Anton

On 8/8/07, Wolfgang Reissnegger [off-list ref]
wrote:
quoted
Hi Anton,

it looks as if your init executable is not doing the right thing
and for some reason terminates. Maybe your inittab configuration is
wrong? Maybe the init executable has been compiled with the wrong
options?

You can try to copy another executable (e.g. sh, getty) into /init
and see if you get any output. If you see anything doing that then
most likely there's something wrong with your init executable.

Wolfgang

Anton Kowalski wrote:
quoted
Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The
kernel boots fine but the init process does not produce any
output. The /init program resides in an initramfs file system and
I believe the /dev device files have been set up correctly.
Here's an excerpt from my initramfs specification:

dir /dev 755 0 0 nod /dev/console 644 0 0 c 5 1 nod /dev/ttyS0
644 0 0 c 4 64

(I am able to open these files from the init program. I tested
this by sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and
before the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4
ports, IRQ sharing disabled [    0.513862] serial8250.0: ttyS0 at
MMIO 0x80201003 (irq = 3) is a 16550A [    2.927509] RAMDISK
driver initialized: 1 RAM disks of 8192K size 1024 blocksize [
3.018391] tun: Universal TUN/TAP device driver, 1.6 [
3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref] 
[    3.154919] mice: PS/2 mouse device common for all mice [
3.218021] TCP cubic registered [    3.257034] NET: Registered
protocol family 1 [    3.309405] NET: Registered protocol family
17 [    3.363462] Freeing unused kernel memory: 300k init [
23.488277] Kernel panic - not syncing: Attempted to kill init! [
23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite
driver didn't work so I switched.) The kernel and the init
program were compiled with eldk.

Any insights into resolving this problem are greatly appreciated.



Anton _______________________________________________ 
Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org 
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: no output to serial console from /init process on ml405

From: Anton Kowalski <hidden>
Date: 2007-08-08 19:31:29

On 8/8/07, Wolfgang Reissnegger [off-list ref] wrote:
The thing that points to a problem with init is:
  Kernel panic - not syncing: Attempted to kill init!

What is the string that is supposed to be printed? Maybe the printf
tries to print a string at an invalid address, causing init to crash?
To test that hypothesis, I created a program that loops indefinitely:

  for (;;) {
          printf("hello\n");
          sleep(1);
  }
  return 0;

This produces the following output:

[    2.715404] Freeing unused kernel memory: 116k init
[    2.776225] sys_write 1
[    3.808186] sys_write 1
[    4.840192] sys_write 1
[    5.872181] sys_write 1
[    6.904193] sys_write 1
[    7.936181] sys_write 1
....

The string "sys_write 1" is from a printk I inserted into sys_write.

So init doesn't crash, which suggests that I haven't set up the /dev
files correctly.

Thanks again.

Anton
Also, you can check if you set the option for console on serial output:
  Location:
    -> Device Drivers
      -> Character devices
        -> Serial drivers
          -> 8250/16550 and compatible serial support (SERIAL_8250 [=y])

Cheers,
   Wolfgang

Anton Kowalski wrote:
quoted
Wolfgang,

Thanks, I'll try your suggestion.

It's worth noting that the init executable is calling into the
kernel.

I put a printk in sys_write, which is on the call path of printf()
and the output is sent to the console. However, the output of printf
is not to be seen. This suggests the problem is perhaps in the serial
 device setup?

Anton

On 8/8/07, Wolfgang Reissnegger [off-list ref]
wrote:
quoted
Hi Anton,

it looks as if your init executable is not doing the right thing
and for some reason terminates. Maybe your inittab configuration is
wrong? Maybe the init executable has been compiled with the wrong
options?

You can try to copy another executable (e.g. sh, getty) into /init
and see if you get any output. If you see anything doing that then
most likely there's something wrong with your init executable.

Wolfgang

Anton Kowalski wrote:
quoted
Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The
kernel boots fine but the init process does not produce any
output. The /init program resides in an initramfs file system and
I believe the /dev device files have been set up correctly.
Here's an excerpt from my initramfs specification:

dir /dev 755 0 0 nod /dev/console 644 0 0 c 5 1 nod /dev/ttyS0
644 0 0 c 4 64

(I am able to open these files from the init program. I tested
this by sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and
before the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4
ports, IRQ sharing disabled [    0.513862] serial8250.0: ttyS0 at
MMIO 0x80201003 (irq = 3) is a 16550A [    2.927509] RAMDISK
driver initialized: 1 RAM disks of 8192K size 1024 blocksize [
3.018391] tun: Universal TUN/TAP device driver, 1.6 [
3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice [
3.218021] TCP cubic registered [    3.257034] NET: Registered
protocol family 1 [    3.309405] NET: Registered protocol family
17 [    3.363462] Freeing unused kernel memory: 300k init [
23.488277] Kernel panic - not syncing: Attempted to kill init! [
23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite
driver didn't work so I switched.) The kernel and the init
program were compiled with eldk.

Any insights into resolving this problem are greatly appreciated.



Anton _______________________________________________
Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: no output to serial console from /init process on ml405

From: Anton Kowalski <hidden>
Date: 2007-08-08 19:42:46

Indeed I hadn't set up the compulsary links correctly. In reading
through the devices.txt document I realized that I don't have /proc
mounted either. So the following links might not make much sense until
/proc is up.

    slink /dev/fd /proc/self/fd 777 0 0
    slink /dev/stdin /proc/self/fd/0 777 0 0
    slink /dev/stdout /proc/self/fd/1 777 0 0
    slink /dev/stderr /proc/self/fd/2 777 0 0

Thanks for your help.
Anton


On 8/8/07, Benedict, Michael [off-list ref] wrote:
Just a guess, but do you have stdout and friends defined as recommended
in the Compulsory links section of Documentation/devices.txt?
        -Michael
quoted
-----Original Message-----
From:
linuxppc-embedded-bounces+mbenedict=twacs.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+mbenedict=twacs.com@ozlabs.o
rg] On Behalf Of Anton Kowalski
quoted
Sent: Wednesday, August 08, 2007 6:28 AM
To: linuxppc-embedded@ozlabs.org
Subject: no output to serial console from /init process on ml405

Hi All:

I'm trying to bring up linux 2.6.21.1 on an ml405 board. The kernel
boots fine but the init process does not produce any output. The /init
program resides in an initramfs file system and I believe the /dev
device files have been set up correctly. Here's an excerpt from my
initramfs specification:

    dir /dev 755 0 0
    nod /dev/console 644 0 0 c 5 1
    nod /dev/ttyS0 644 0 0 c 4 64

(I am able to open these files from the init program. I tested this by
sleeping for a specified time on success.)

Also, printk continues to function after /init terminates and before
the kernel panics.

Here are the last few lines of the console output:

[    0.507478] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
IRQ sharing disabled
[    0.513862] serial8250.0: ttyS0 at MMIO 0x80201003 (irq =
3) is a 16550A
[    2.927509] RAMDISK driver initialized: 1 RAM disks of 8192K size
1024 blocksize
[    3.018391] tun: Universal TUN/TAP device driver, 1.6
[    3.079115] tun: (C) 1999-2004 Max Krasnyansky [off-list ref]
[    3.154919] mice: PS/2 mouse device common for all mice
[    3.218021] TCP cubic registered
[    3.257034] NET: Registered protocol family 1
[    3.309405] NET: Registered protocol family 17
[    3.363462] Freeing unused kernel memory: 300k init
[   23.488277] Kernel panic - not syncing: Attempted to kill init!
[   23.559517] Rebooting in 180 seconds..<NULL>

I'm using the plb uart and the 8250.c driver. (The obp uartlite driver
didn't work so I switched.) The kernel and the init program were
compiled with eldk.

Any insights into resolving this problem are greatly appreciated.


Anton
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help