Re: init does not run on 405GP system

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

Re: init does not run on 405GP system

From: Bill Fink <hidden>
Date: 2003-06-11 03:21:57

On Tue, 10 Jun 2003, Robert Schwebel 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
boots smoothly (serial console), I see all output and NFS-Root is
mounted via an Intel 82559 network chip. The kernel threads are also
running, I see kupdated & friends being put into the run queue from time
to time.

I have replaced /sbin/init by a statically linked "hello world" (which
also does not give any output). My impression is that the binary code of
the init ELF binary is never run. When I switch on the SHOW_SYSCALLs
macro in arch/ppc/kernel/entry.S I see the system calls for open(),
dup(), dup() and execve() which come from init/main.c. Opening the
console works, execve() to /sbin/init as well. When I follow the path of
execution up to load_elf_binary() in fs/binfmt_elf.c I can even see the
correct code being load and pointed to by elf_entry in that file. But
there is never any output from init, nor does something happen when I
replace init by a piece of code which should immediately make a zero
pointer exception.
This is probably not the issue, but you do have CONFIG_BINFMT_ELF
enabled in the kernel, don't you (although I would assume you would
get some kind of kernel error message when you tried to exec /sbin/init
if CONFIG_BINFMT_ELF wasn't enabled).

						-Bill

** 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-11 04:53:52

On Tue, Jun 10, 2003 at 11:21:57PM -0400, Bill Fink wrote:
This is probably not the issue, but you do have CONFIG_BINFMT_ELF
enabled in the kernel, don't you (although I would assume you would
get some kind of kernel error message when you tried to exec /sbin/init
if CONFIG_BINFMT_ELF wasn't enabled).
The option is always defined y for PowerPC, you cannot deselect it. But
I've checked it anyway ;)

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/

Re: init does not run on 405GP system

From: Bill Fink <hidden>
Date: 2003-06-11 06:22:15

On Wed, 11 Jun 2003, Robert Schwebel wrote:
On Tue, Jun 10, 2003 at 11:21:57PM -0400, Bill Fink wrote:
quoted
This is probably not the issue, but you do have CONFIG_BINFMT_ELF
enabled in the kernel, don't you (although I would assume you would
get some kind of kernel error message when you tried to exec /sbin/init
if CONFIG_BINFMT_ELF wasn't enabled).
The option is always defined y for PowerPC, you cannot deselect it. But
I've checked it anyway ;)
One other simple thing to try if you haven't already is the kernel
boot parameter init=/bin/bash.  Also make sure any necessary shared
libraries are available at boot time.  On my system:

gwiz% ldd /sbin/init
        libc.so.6 => /lib/libc.so.6 (0x0fea0000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x30000000)

Also on my system:

gwiz% strings - /sbin/init | grep '^/'
/lib/ld.so.1
/e=
/sbin/init
/dev/console
/dev/tty0
/dev/null
/etc/ioctl.save
/etc/initscript
/bin/sh
/etc/inittab
/etc/initrunlvl
/var/log/initrunlvl
/dev/initctl
/etc/powerstatus
/var/run/utmp
/var/log/wtmp
/var/run/utmp
/sbin/sulogin

Your system may be slightly different.  Perhaps the absence of one of
these may cause init to die (although not all of them exist even on my
system).

						-Bill

** 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-11 07:11:21

On Wed, Jun 11, 2003 at 02:22:15AM -0400, Bill Fink wrote:
One other simple thing to try if you haven't already is the kernel
boot parameter init=/bin/bash.
Well, I've replaced init by a statically linked hello-world program. So
there should be no need for any shared library besides ld.so.1, the ELF
processor, but that one is loaded correctly and as far as I can see it
interprets the ELF file right; the right code is loaded (compared the
binary mem content at the entry point with objdump output) and the
correct entry point is called, but exactly after that I don't get an
answer any more. Unfortunately this is the point where the BDI doesn't
help any more because it cannot follow the user space memory mapping.
gwiz% ldd /sbin/init
        libc.so.6 => /lib/libc.so.6 (0x0fea0000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x30000000)
metis:/tftpboot/solidcard/sbin# file init
init: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), statically linked, stripped

And I don't see any call to the open() system call.

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