* execve of /sbin/init fails
@ 2006-05-30 19:59 Anantharaman Chetan-W16155
2006-05-30 21:15 ` Andy Gospodarek
2006-05-30 21:29 ` Steve Iribarne (GMail)
0 siblings, 2 replies; 6+ messages in thread
From: Anantharaman Chetan-W16155 @ 2006-05-30 19:59 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Hi,
I am trying to bring up a custom board with a PPC405 processor running
Linux 2.4.20 (MontaVista Release) and am having problems with the call
to execve("/sbin/init", argv_init, envp_init) not returning in the file
main.c. The processor just hangs and there is no output on the terminal.
I have tried to see if I can run "bin/sh" and even this execve call does
not return. Some things about the board are, the networking option has
been disabled in the Linux .config file. I am running U-Boot 1.1.1 as
the bootloader and am downloading the uImage (compressed kernel) and the
initrd.boot (filesystem) into RAM and accessing the filesystem in RAM.
Any help as to what could be causing this to happen or how to debug this
issue would be appreciated. Also, I've tried to capture the return value
of the execve call but since the call does not return, this has not
helped any.
Thanks,
Chetan Anantharaman
[-- Attachment #2: Type: text/html, Size: 3069 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: execve of /sbin/init fails
@ 2006-05-30 20:54 Jeff.Fellin
2006-05-30 22:16 ` Anantharaman Chetan-W16155
0 siblings, 1 reply; 6+ messages in thread
From: Jeff.Fellin @ 2006-05-30 20:54 UTC (permalink / raw)
To: Chetan.S.Anantharaman
Cc: linuxppc-embedded-bounces+jeff.fellin=rflelect.com,
linuxppc-embedded
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgICAgIkFuYW50aGFy
YW1hbiBDaGV0YW4tVzE2MTU1IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCiAgICAg
ICAgICAgICAgICAgICAgICA8Q2hldGFuLlMuQW5hbnRoYXJhbWFuQG1vdG9yb2xhLmNvbT4gICAg
ICAgICAgICAgICAgICAgICAgVG86ICAgICAgIDxsaW51eHBwYy1lbWJlZGRlZEBvemxhYnMub3Jn
PiAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICAgIFNlbnQgYnk6ICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYzogICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAg
ICAgICAgICAgICAgbGludXhwcGMtZW1iZWRkZWQtYm91bmNlcytqZWZmLmZlbGxpbj1yZmxlbGVj
dC5jb20gICAgICAgIFN1YmplY3Q6ICBleGVjdmUgb2YgL3NiaW4vaW5pdCBmYWlscyAgICAgICAg
ICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICAgICAgICBAb3psYWJzLm9yZyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICAgICAg
ICAwNS8zMC8yMDA2IDE1OjU5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAN
Cg0KDQoNCg0KDQoNCg0KDQo+SGksDQo+SSBhbSB0cnlpbmcgdG8gYnJpbmcgdXAgYSBjdXN0b20g
Ym9hcmQgd2l0aCBhIFBQQzQwNSBwcm9jZXNzb3IgcnVubmluZw0KTGludXggMi40LjIwIChNb250
YVZpc3RhIFJlbGVhc2UpIGFuZCBhbSA+aGF2aW5nIHByb2JsZW1zIHdpdGggdGhlIGNhbGwgdG8N
CmV4ZWN2ZSjigJwvc2Jpbi9pbml04oCdLCBhcmd2X2luaXQsIGVudnBfaW5pdCkgbm90IHJldHVy
bmluZyBpbiB0aGUgZmlsZQ0KbWFpbi5jLiBUaGUgcHJvY2Vzc29yID5qdXN0IGhhbmdzIGFuZCB0
aGVyZSBpcyBubyBvdXRwdXQgb24gdGhlIHRlcm1pbmFsLiBJDQpoYXZlIHRyaWVkIHRvIHNlZSBp
ZiBJIGNhbiBydW4g4oCcYmluL3No4oCdIGFuZCBldmVuIHRoaXMgZXhlY3ZlIGNhbGwgZG9lcyA+
bm90DQpyZXR1cm4uIFNvbWUgdGhpbmdzIGFib3V0IHRoZSBib2FyZCBhcmUsIHRoZSBuZXR3b3Jr
aW5nIG9wdGlvbiBoYXMgYmVlbg0KZGlzYWJsZWQgaW4gdGhlIExpbnV4IC5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WRkZWRAb3psYWJzLm9yZw0KaHR0cHM6
Ly9vemxhYnMub3JnL21haWxtYW4vbGlzdGluZm8vbGludXhwcGMtZW1iZWRkZWQNCg==
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: execve of /sbin/init fails
2006-05-30 19:59 execve of /sbin/init fails Anantharaman Chetan-W16155
@ 2006-05-30 21:15 ` Andy Gospodarek
2006-05-30 21:29 ` Steve Iribarne (GMail)
1 sibling, 0 replies; 6+ messages in thread
From: Andy Gospodarek @ 2006-05-30 21:15 UTC (permalink / raw)
To: Anantharaman Chetan-W16155; +Cc: linuxppc-embedded
You could also try compiling init statically. I've had success with
that in the past until I figured out what the actual problem was.
On 5/30/06, Anantharaman Chetan-W16155
<Chetan.S.Anantharaman@motorola.com> wrote:
>
>
>
>
> Hi,
>
> I am trying to bring up a custom board with a PPC405 processor running Linux
> 2.4.20 (MontaVista Release) and am having problems with the call to
> execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.
> The processor just hangs and there is no output on the terminal. I have
> tried to see if I can run "bin/sh" and even this execve call does not
> return. Some things about the board are, the networking option has been
> disabled in the Linux .config file. I am running U-Boot 1.1.1 as the
> bootloader and am downloading the uImage (compressed kernel) and the
> initrd.boot (filesystem) into RAM and accessing the filesystem in RAM.
>
>
>
> Any help as to what could be causing this to happen or how to debug this
> issue would be appreciated. Also, I've tried to capture the return value of
> the execve call but since the call does not return, this has not helped any.
>
>
>
> Thanks,
>
> Chetan Anantharaman
>
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: execve of /sbin/init fails
2006-05-30 19:59 execve of /sbin/init fails Anantharaman Chetan-W16155
2006-05-30 21:15 ` Andy Gospodarek
@ 2006-05-30 21:29 ` Steve Iribarne (GMail)
2006-05-30 22:15 ` Andy Gospodarek
1 sibling, 1 reply; 6+ messages in thread
From: Steve Iribarne (GMail) @ 2006-05-30 21:29 UTC (permalink / raw)
To: Anantharaman Chetan-W16155; +Cc: linuxppc-embedded
On 5/30/06, Anantharaman Chetan-W16155
<Chetan.S.Anantharaman@motorola.com> wrote:
>
>
>
>
> Hi,
>
> I am trying to bring up a custom board with a PPC405 processor running Linux
> 2.4.20 (MontaVista Release) and am having problems with the call to
> execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.
Hmm.. Ok.. so I've read the other suggestions all good, but I think we
are missing some info. Are you running Busybox? If you are using
Busybox, what version? Also, what init are you using? Are you using
busyboxes?
The ramdisk suggestion was a good one. First off, check what is in
your ramdisk. Also check the rights of the files in the ramdisk.
Make sure you have the execute bit set. I've seen exactly what you
are seeing when my rights on the file init were messed up.
Also I think I've seen a hang with an older version of Busybox using
their version of init. I just got sysinit and that seemed to fix it,
(Although I had to reconfig Busybox to not use their version of init)
> The processor just hangs and there is no output on the terminal.
When you say the process just "hangs", where are you in the boot
cycle? Is it before you see the linux kernel starting to load? Or do
you see any kernel messages start to spew out?
Hope this helps a little.
-stv
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: execve of /sbin/init fails
2006-05-30 21:29 ` Steve Iribarne (GMail)
@ 2006-05-30 22:15 ` Andy Gospodarek
0 siblings, 0 replies; 6+ messages in thread
From: Andy Gospodarek @ 2006-05-30 22:15 UTC (permalink / raw)
To: Steve Iribarne (GMail); +Cc: Anantharaman Chetan-W16155, linuxppc-embedded
On 5/30/06, Steve Iribarne (GMail) <netstv@gmail.com> wrote:
> On 5/30/06, Anantharaman Chetan-W16155
> <Chetan.S.Anantharaman@motorola.com> wrote:
> >
> >
> >
> >
> > Hi,
> >
> > I am trying to bring up a custom board with a PPC405 processor running Linux
> > 2.4.20 (MontaVista Release) and am having problems with the call to
> > execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.
>
>
> Hmm.. Ok.. so I've read the other suggestions all good, but I think we
> are missing some info. Are you running Busybox? If you are using
> Busybox, what version? Also, what init are you using? Are you using
> busyboxes?
>
> The ramdisk suggestion was a good one. First off, check what is in
> your ramdisk. Also check the rights of the files in the ramdisk.
> Make sure you have the execute bit set. I've seen exactly what you
> are seeing when my rights on the file init were messed up.
>
> Also I think I've seen a hang with an older version of Busybox using
> their version of init. I just got sysinit and that seemed to fix it,
> (Although I had to reconfig Busybox to not use their version of init)
>
I guess I totally assumed busybox was being used, so good suggestion.
I too saw this with an older version of busybox (0.60 maybe?) and I
ended up editing the config to contain only init and then compiled it
statically and placed it on the rootfs. It turned out to be just the
right size and functionality for my needs. I think I later updated to
a 1.0 or 1.1-series and didn't have to use the same hack.
>
>
>
> > The processor just hangs and there is no output on the terminal.
>
>
> When you say the process just "hangs", where are you in the boot
> cycle? Is it before you see the linux kernel starting to load? Or do
> you see any kernel messages start to spew out?
>
> Hope this helps a little.
>
> -stv
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: execve of /sbin/init fails
2006-05-30 20:54 Jeff.Fellin
@ 2006-05-30 22:16 ` Anantharaman Chetan-W16155
0 siblings, 0 replies; 6+ messages in thread
From: Anantharaman Chetan-W16155 @ 2006-05-30 22:16 UTC (permalink / raw)
To: Jeff.Fellin, Steve Iribarne (GMail), adgospod
Cc: linuxppc-embedded-bounces+jeff.fellin=rflelect.com,
linuxppc-embedded
Thanks for your reply. Yes, the file /sbin/init is in the ramdisk file
system with execute permissions on it. I am running Busybox (how can I
check the version?), but my /sbin/init is not Busybox's init.
One thing I'd like to mention is, I have used the same ramdisk
filesystem and the same version of Linux 2.4 kernel and U-Boot
bootloader and have been able to successfully execute the /sbin/init.
This board has a Xilinx Virtex 2 Pro FPGA with a PPC405. On my new
board, with a Xilinx Virtex 4 FX100 FPGA, with the kernel running on a
PPC405 and the same filesystem, the execve of /sbin/init "hangs". By
hangs, I mean there is no output on the console after the below output
and it does not return (which indicates that it has not encountered an
error of some sort, since execve returns on error only). So, I am not
sure where it is stuck and is there any way to tell where it's stuck at?
Hope this above info and below screen capture provide a bit more
background to the issue.
Below is a capture of the screen output:
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
OCP uart ver 1.6.2 init complete
LSP Revision 42
ikconfig 0.5 with /proc/ikconfig
Starting kswapd
Disabling the Out Of Memory Killer
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xfdfff003 (irq =3D 22) is a 16550A
xgpio #0 at 0x50000000 mapped to 0xC5000000
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Tracer: Initialization complete
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 5104k freed
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
Freeing unused kernel memory: 40k init
-----Original Message-----
From: Jeff.Fellin@rflelect.com [mailto:Jeff.Fellin@rflelect.com]=20
Sent: Tuesday, May 30, 2006 3:55 PM
To: Anantharaman Chetan-W16155
Cc: linuxppc-embedded@ozlabs.org;
linuxppc-embedded-bounces+jeff.fellin=3Drflelect.com@ozlabs.org
Subject: Re: execve of /sbin/init fails
=20
"Anantharaman Chetan-W16155"
<Chetan.S.Anantharaman@motorola.com>
To: <linuxppc-embedded@ozlabs.org> =20
Sent by:
cc: =20
=
linuxppc-embedded-bounces+jeff.fellin=3Drflelect.com
Subject: execve of /sbin/init fails =20
@ozlabs.org
=20
=20
05/30/2006 15:59
=20
=20
>Hi,
>I am trying to bring up a custom board with a PPC405 processor running
Linux 2.4.20 (MontaVista Release) and am >having problems with the call
to
execve("/sbin/init", argv_init, envp_init) not returning in the file
main.c. The processor >just hangs and there is no output on the
terminal. I
have tried to see if I can run "bin/sh" and even this execve call does
>not
return. Some things about the board are, the networking option has been
disabled in the Linux .config file. I am >running U-Boot 1.1.1 as the
bootloader and am downloading the uImage (compressed kernel) and the
initrd.boot >(filesystem) into RAM and accessing the filesystem in RAM.
Chetan, I would check the contents of the initrd filesystem you created
to
verify the files are in the image. If they are monitor the console
output
to verfiy the ramdisk filesystem is found and installed into ram.
Jeff Fellin
>Any help as to what could be causing this to happen or how to debug
this
issue would be appreciated. Also, I've tried >to capture the return
value
of the execve call but since the call does not return, this has not
helped
any.
Thanks,
Chetan Anantharaman
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-05-30 22:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30 19:59 execve of /sbin/init fails Anantharaman Chetan-W16155
2006-05-30 21:15 ` Andy Gospodarek
2006-05-30 21:29 ` Steve Iribarne (GMail)
2006-05-30 22:15 ` Andy Gospodarek
-- strict thread matches above, loose matches on Subject: below --
2006-05-30 20:54 Jeff.Fellin
2006-05-30 22:16 ` Anantharaman Chetan-W16155
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).