Re: init does not run on 405GP system

2 messages, 2 authors, 2003-06-10 · open the first message on its own page

Re: init does not run on 405GP system

From: Wolfgang Denk <hidden>
Date: 2003-06-10 14:39:06

In message [off-list ref] you wrote:
I'm currently porting u-boot and Linux to an IBM 405GP based board. The
problem is now that init seems not to be running and does not give any
output. Up to that point where init should make some noise the kernel
...
Nevertheless, the kernel runs smoothly. I can ping the machine, I can
even floodping it with 0% packet loss. Only that there is no userspace
running.
Do user space program like init really don;t run,  or  is  there  any
chance that you just might see no output?

You can do a couple of things:

* Check your adaptions of the kernel source and your kernel  configu-
  ration is you really have a working serial console port.

* If booting over NFS realy works, you can try to start a (statically
  linked small test program) that does something else but a printf to
  the console. For example, open  a  file  in  /tmp  for  output  and
  frpintf to that file.

* Or  start  your  test  program  with  a  known  system  call  (like
  gettimeofday() or maybe even getuid() etc.) and set a breakpoint at
  the system call handler code inthe kernel.


You wrote "opening the console works" - set a breakpoint, and  verify
that your console driver is really initialized and used.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
In general, if you think something isn't in Perl, try it out, because
it usually is :-) - Larry Wall in [off-list ref]

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: init does not run on 405GP system

From: Robert Schwebel <hidden>
Date: 2003-06-10 15:27:43

On Tue, Jun 10, 2003 at 04:39:06PM +0200, Wolfgang Denk wrote:
Do user space program like init really don;t run,  or  is  there  any
chance that you just might see no output?
I'm not sure...
* Check your adaptions of the kernel source and your kernel  configu-
  ration is you really have a working serial console port.
I suppose yes - printk() works just fine and I see the complete kernel
output on the serial line.
* If booting over NFS realy works, you can try to start a (statically
  linked small test program) that does something else but a printf to
  the console. For example, open  a  file  in  /tmp  for  output  and
  frpintf to that file.
Tried - does not work. Even when I end the init program with return 0; I
would expect the kernel panic which does not come. the fprintf() should
also trigger sys_write() being called which does not happen. This all
lets me assume that the code of the init process is not really run.

The strange thing is that there is also no error message. I would
normally expect that when some mapping is broken the kernel would just
blow up with all kinds of uggly noise. When I output which task is
currently being scheduled init runs more or less all the time, only
interrupted by the kernel daemons. I see no idle task.
You wrote "opening the console works" - set a breakpoint, and  verify
that your console driver is really initialized and used.
Well, as I can use printk() from kernel space, shouldn't the driver
work? But nevertheless, I've hooked a printk() into
drivers/char/serial.c:rs_open() and I get the output.

Robert
--
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help