initrd - console

Siva Prasad sprasad at bivio.net
Thu Dec 13 13:06:50 EST 2007


Thanks for the response Michael.

Yes!... I do have /dev/console
I also have the following line in /etc/inittab (::respawn:/sbin/getty -L
ttyS0 115200 VT100)

Still  it does not print any thing from the user land. All the kernel
printk's are working fine.

I tried to print the arguments and environment variables for getty and
echo /dev/console. Below is the info.

sys_execve - filename=/sbin/getty.
copy_strings: kaddr = /sbin/getty.
copy_strings: kaddr = USER=root.
copy_strings: kaddr = SHELL=/bin/sh.
copy_strings: kaddr = PATH=/usr/bin:/bin:/usr/sbin:/sbin.
copy_strings: kaddr = TERM=vt102.
copy_strings: kaddr = HOME=/.
copy_strings: kaddr = VT100.
copy_strings: kaddr = 115200.
copy_strings: kaddr = ttyS0.
copy_strings: kaddr = -L.
copy_strings: kaddr = /sbin/getty.

sys_execve - filename=/bin/echo.
copy_strings: kaddr = /bin/echo.
copy_strings: kaddr = GATEWAY0=172.27.255.254.
copy_strings: kaddr = NETMASK0=255.255.0.0.
copy_strings: kaddr = PWD=/.
copy_strings: kaddr = SMBD_ARGS=.
copy_strings: kaddr = NAMESERVER0=172.27.0.1.
copy_strings: kaddr = NTP_SERVER=.
copy_strings: kaddr = SHELL=/bin/sh.
copy_strings: kaddr = INETD_ARGS=.
copy_strings: kaddr = BOA_ARGS=.
copy_strings: kaddr = NMBD_ARGS=.
copy_strings: kaddr = TMPFS=tmpfs.
copy_strings: kaddr = PATH=/usr/bin:/bin:/usr/sbin:/sbin.
copy_strings: kaddr = READONLY_FS=.
copy_strings: kaddr = TERM=vt102.
copy_strings: kaddr = MODLIST=.
copy_strings: kaddr = SYSCFG_IFACE0=y.
copy_strings: kaddr = IPADDR0=172.27.180.41.
copy_strings: kaddr = DEPLOYMENT_STYLE=RAMDISK.
copy_strings: kaddr = SYSCFG_DHCPC_CMD=udhcpc -b -i .
copy_strings: kaddr = DHCP_ARG=.
copy_strings: kaddr = RAMDIRS=.
copy_strings: kaddr = BROADCAST0=172.27.255.255.
copy_strings: kaddr = HOME=/.
copy_strings: kaddr = HOSTNAME=mpc8641hpcn.
copy_strings: kaddr = USER=root.
copy_strings: kaddr = INTERFACE0=eth0.
copy_strings: kaddr = /dev/console.
copy_strings: kaddr = echo.

Thanks
Siva


-----Original Message-----
From: Michael Ellerman [mailto:michael at ellerman.id.au] 
Sent: Monday, December 10, 2007 5:34 PM
To: Siva Prasad
Cc: linuxppc-dev at ozlabs.org; linuxppc-embedded at ozlabs.org
Subject: Re: initrd - console

On Mon, 2007-12-10 at 17:26 -0800, Siva Prasad wrote:
> Hi,
> 
> I am trying to boot kernel with initrd. However, it hangs in
> run_init_process("/sbin/init"). I went into the system calls to see
what
> it is doing. 
> 
> As part of debugging, I ended up adding a printk statement in
> arch/powerpc/kernel/process.c:sys_execve() routine. Noticed that all
the
> calls are coming here, however nothing is printed on the screen. I
think
> initrd is executing fine (unless one of you says otherwise). See the
> capture below for boot log.
> 
> Question 1: how come nothing is printed from ramdisk (userland
programs)
> to the serial console, while all the kernel printk's are working
> perfectly?

Do you have a /dev/console etc. in your initrd?

> Question 2: How important is to have interrupts working for just
> printing. I know that interrupts are must to enter input.

Depends on what your console is, but if it's something simple then you
should be able to write to it without taking interrupts.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person



More information about the Linuxppc-dev mailing list