init does not run on 405GP system
Quoted 8 lines · Robert Schwebel
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.
Quoted 11 lines
I have replaced
/sbin/initby 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 theSHOW_SYSCALLsmacro inarch/ppc/kernel/entry.SI see the system calls foropen(),dup(),dup()andexecve()which come frominit/main.c. Opening the console works,execve()to/sbin/initas well. When I follow the path of execution up toload_elf_binary()infs/binfmt_elf.cI can even see the correct code being load and pointed to byelf_entryin 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/
Quoted 4 lines · Bill Fink
This is probably not the issue, but you do have
CONFIG_BINFMT_ELFenabled 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/initifCONFIG_BINFMT_ELFwasn'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/
Quoted 8 lines · Robert Schwebel
Quoted 4 lines · Bill Fink
This is probably not the issue, but you do have
CONFIG_BINFMT_ELFenabled 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/initifCONFIG_BINFMT_ELFwasn'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/
Quoted 2 lines · Bill Fink
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.
Quoted 3 lines
gwiz% ldd
/sbin/initlibc.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/