Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Executing Programs from initrd
@ 2001-05-05  2:36 Patrick Fisher
  2001-05-05  2:36 ` Patrick Fisher
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Patrick Fisher @ 2001-05-05  2:36 UTC (permalink / raw)
  To: linux-mips


I'm plodding along working with Linux/MIPS (and Linux-VR) on a Philips Nino.
I can boot linux, and fool around with the stand alone shell.  I can also
execute a program included on Steven Hill's Nino ramdisk - a simple Hello
World program, in assembly, which I compiled with my mipsel-linux toolchain
(well, also from Steven Hill, but it was compiled locally on my own
machine).  That program runs fine.

    However, I can't run any binaries other than this one and the shell.  I
wrote an additional Hello World program in C, compiled it for mipsel, and
put it in the ramdisk.  The executable is definitely there when I boot on
the nino - I can send it all to the serial console and see that it exists.
However, any attempt to execute it returns "No such file or directory".
It's got all the right permissions, and this occurs when I'm positive I'm
giving it the whole path.  It simply can't see the file.  I also copied "ls"
from a root image for a mipsel decstation, and got the same problem.  I
downloaded the GNU fileutils source, set it for a mipsel target, compiled,
put a few binaries on the ramdisk, and again, it can't find the file (but
it's there, and I can see the contents).
This occurs on a ~650k ramdisk with ~30k free, and a 2MB ramdisk with ~1.5MB
free, using either the SGI Linux/MIPS sources or the Linux-VR project's
sources.


Any ideas?

Thanks,
Patrick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Executing Programs from initrd
  2001-05-05  2:36 Executing Programs from initrd Patrick Fisher
@ 2001-05-05  2:36 ` Patrick Fisher
  2001-05-05  2:57 ` Keith Owens
  2001-05-05  3:00 ` Keith M Wesolowski
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick Fisher @ 2001-05-05  2:36 UTC (permalink / raw)
  To: linux-mips


I'm plodding along working with Linux/MIPS (and Linux-VR) on a Philips Nino.
I can boot linux, and fool around with the stand alone shell.  I can also
execute a program included on Steven Hill's Nino ramdisk - a simple Hello
World program, in assembly, which I compiled with my mipsel-linux toolchain
(well, also from Steven Hill, but it was compiled locally on my own
machine).  That program runs fine.

    However, I can't run any binaries other than this one and the shell.  I
wrote an additional Hello World program in C, compiled it for mipsel, and
put it in the ramdisk.  The executable is definitely there when I boot on
the nino - I can send it all to the serial console and see that it exists.
However, any attempt to execute it returns "No such file or directory".
It's got all the right permissions, and this occurs when I'm positive I'm
giving it the whole path.  It simply can't see the file.  I also copied "ls"
from a root image for a mipsel decstation, and got the same problem.  I
downloaded the GNU fileutils source, set it for a mipsel target, compiled,
put a few binaries on the ramdisk, and again, it can't find the file (but
it's there, and I can see the contents).
This occurs on a ~650k ramdisk with ~30k free, and a 2MB ramdisk with ~1.5MB
free, using either the SGI Linux/MIPS sources or the Linux-VR project's
sources.


Any ideas?

Thanks,
Patrick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Executing Programs from initrd
  2001-05-05  2:36 Executing Programs from initrd Patrick Fisher
  2001-05-05  2:36 ` Patrick Fisher
@ 2001-05-05  2:57 ` Keith Owens
  2001-05-05  3:00 ` Keith M Wesolowski
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Owens @ 2001-05-05  2:57 UTC (permalink / raw)
  To: Patrick Fisher; +Cc: linux-mips

On Fri, 4 May 2001 22:36:31 -0400, 
"Patrick Fisher" <pbfisher@seas.upenn.edu> wrote:
>However, any attempt to execute it returns "No such file or directory".

That particular error message is highly misleading.  Most people read
it as "the file I'm trying to execute does not exist" but it is also
issued when the loader cannot be found or one of the run time libraries
cannot be found.  At a guess you have a mismatch between the mipsel
loader and the Nino loader.  Run strings on a working and a failing
binary and look at the required loader and libraries, usually the first
few strings.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Executing Programs from initrd
  2001-05-05  2:36 Executing Programs from initrd Patrick Fisher
  2001-05-05  2:36 ` Patrick Fisher
  2001-05-05  2:57 ` Keith Owens
@ 2001-05-05  3:00 ` Keith M Wesolowski
  2 siblings, 0 replies; 4+ messages in thread
From: Keith M Wesolowski @ 2001-05-05  3:00 UTC (permalink / raw)
  To: Patrick Fisher; +Cc: linux-mips

On Fri, May 04, 2001 at 10:36:31PM -0400, Patrick Fisher wrote:

>     However, I can't run any binaries other than this one and the shell.  I
> wrote an additional Hello World program in C, compiled it for mipsel, and
> put it in the ramdisk.  The executable is definitely there when I boot on
> the nino - I can send it all to the serial console and see that it exists.
> However, any attempt to execute it returns "No such file or directory".

Did you compile with -static?  If not, the system will attempt to load
it with /lib/ld.so.1.  Do you have that file?  Is it executable?  What
about libc?

If you have a file starting with

#! /bin/fux0r

and /bin/fux0r does not exist, the execution will fail with that exact
error.  In fact from the system's point of view it's the same thing
with /lib/ld.so.1 instead of /bin/fux0r.

-- 
Keith M Wesolowski <wesolows@foobazco.org> http://foobazco.org/~wesolows
------(( Project Foobazco Coordinator and Network Administrator ))------
	"Nothing motivates a man more than to see his boss put
	 in an honest day's work." -- The fortune file

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-05-05  3:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-05  2:36 Executing Programs from initrd Patrick Fisher
2001-05-05  2:36 ` Patrick Fisher
2001-05-05  2:57 ` Keith Owens
2001-05-05  3:00 ` Keith M Wesolowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox