kernel space to user space /bin/sh startup
I am trying to boot linux on a PXA270 and I think I almost have it but the shell seems to not be outputting to the terminal. The kernel boots, mounts the root file system, opens ttyS0 and proceeds to call run_init_process("/bin/sh") however I see no login prompt or shell appear. I am using ptxdist to build the kernel and jffs2 image. After run_init_process("/bin/sh") is run I can type on the console and characters are echoed back to the screen, but still no other output. Is it possible that the output is being directed to somewhere which is not correct?
My /etc/inittab is as follows:
#############################################################
#
# /etc/inittab # # $Id: inittab 1681 2004-09-01 18:12:49Z $ # console::sysinit:/etc/init.d/rcS console::respawn:/sbin/getty -L 115200 /dev/ttyS0 vt100 # Stuff to do before rebooting ::ctrlaltdel:/sbin/reboot ::shutdown:/bin/umount -a -r #############################################################
My /etc/init.d/rcS is as follows:
#############################################################
#!/bin/sh
#
# /etc/init.d/rcS
#
# $Id: rcS 2054 2004-11-25 10:57:09Z mkl $
#
echo -n "mounting filesystems..."
mount -a 2>/dev/null
echo "done."
# modprobe ppp_async # loadkmap < /etc/boottime.kmap # set hostname test -e /etc/hostname && hostname -F /etc/hostname echo -n "creating Network-Device lo..." ifconfig lo up 127.0.0.1 echo "done." echo "running rc.d services..." run-parts -a start /etc/rc.d #############################################################
This is the final output I see.
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 76K
opening ttyS0...uart_open(0) called
Now I can type on the console and characters are echoed back, pressing ctrl-c echoes: "uart_flush_buffer(0) called" so the code is still running, but I am not sure where I am or why I see no login prompt or shell command line.
I never see the "mounting filesystems..." echoed to the screen, but the code does not stall and no errors are reported by the kernel. Any help during the transition from init/main.c in kernel space to user space would be appreciated, so I could debug this further.
I have looked around and have not seen a solution for my problem, most likely due to the fact that I am not entirely sure what the problem is.
Thanks in advance for your time,
Tom Strader
Quoted 13 lines · Tom Strader
console::sysinit:/etc/init.d/rcS console::respawn:/sbin/getty -L 115200
/dev/ttyS0vt100Now I can type on the console and characters are echoed back, pressing ctrl-c echoes: "
uart_flush_buffer(0)called" so the code is still running, but I am not sure where I am or why I see no login prompt or shell command line.
I never see the "mounting filesystems..." echoed to the screen, but the code does not stall and no errors are reported by the kernel. Any help during the transition frominit/main.cin kernel space to user space would be appreciated, so I could debug this further.
I have looked around and have not seen a solution for my problem, most likely due to the fact that I am not entirely sure what the problem is.
Perhaps your terminal program is set to 9600 bps?
Jan
Nope. Terminal is set correctly, the kernel is outputting messages, the command line arguments sent to the kernel have 115200 set. What would happen if the getty was not started correctly? Would the echoes in rcS still appear? I feel like it may be related to the getty and userspace prints due to the fact the kernel is still printing and responding to commands.
Tom
-----Original Message-----
From: Jan Engelhardt [mailto:[email protected]]
Sent: Wednesday, April 11, 2007 8:48 AM
To: Tom Strader
Cc: [email protected]
Subject: Re: kernel space to user space /bin/sh startup
Quoted 13 lines · Tom Strader
console::sysinit:/etc/init.d/rcS console::respawn:/sbin/getty -L 115200
/dev/ttyS0vt100Now I can type on the console and characters are echoed back, pressing ctrl-c echoes: "
uart_flush_buffer(0)called" so the code is still running, but I am not sure where I am or why I see no login prompt or shell command line.
I never see the "mounting filesystems..." echoed to the screen, but the code does not stall and no errors are reported by the kernel. Any help during the transition frominit/main.cin kernel space to user space would be appreciated, so I could debug this further.
I have looked around and have not seen a solution for my problem, most likely due to the fact that I am not entirely sure what the problem is.
Perhaps your terminal program is set to 9600 bps?
Jan
Quoted 4 lines · Tom Strader
Nope. Terminal is set correctly, the kernel is outputting messages, the command line arguments sent to the kernel have 115200 set. What would happen if the getty was not started correctly?
I'd say you have no login prompt then after rcS finished. Thanks for NOT top posting.
Quoted 30 lines
Would the echoes in rcS
still appear? I feel like it may be related to the getty and userspace prints due to the fact the kernel is still printing and responding to commands.
Tom-----Original Message-----
From: Jan Engelhardt [mailto:[email protected]]
Sent: Wednesday, April 11, 2007 8:48 AM
To: Tom Strader
Cc: [email protected]
Subject: Re: kernel space to user space/bin/shstartupQuoted 13 lines · Tom Strader
console::sysinit:/etc/init.d/rcS console::respawn:/sbin/getty -L 115200
/dev/ttyS0vt100Now I can type on the console and characters are echoed back, pressing ctrl-c echoes: "
uart_flush_buffer(0)called" so the code is still running, but I am not sure where I am or why I see no login prompt or shell command line.
I never see the "mounting filesystems..." echoed to the screen, but the code does not stall and no errors are reported by the kernel. Any help during the transition frominit/main.cin kernel space to user space would be appreciated, so I could debug this further.
I have looked around and have not seen a solution for my problem, most likely due to the fact that I am not entirely sure what the problem is.
Quoted 9 lines
Perhaps your terminal program is set to 9600 bps?
Jan
Jan