Subject: Ramdisk problem

From: "Meng, David" <[email-masked]>
Date: Fri, 16 Jun 2000 15:14:48 -0700

Hi George and all:
I am using a cross compiler to build a ramdisk.  For the first try, I linked
the init, busybox, bash and tinylogin statically. They can work.  And then,
I build a hello apps into the ramdisk wit dynamic link.   I also put all the
libraries from my cross compiler(glibc-2.1.3) into the ramdisk /lib
directory.  I set the permission 777 for the hello executable.  After the
linux and ramdisk are up, I tried to execute the hello.  I got an error
message like following:
    bash: ./hello: No such file or directory.
If I statically link the hello, it works fine.

I do not understand why the dynamic linked hello can not work.  I believe
there are some issues how to use the shared libraries.  Would you or any one
else let me know if you meet the same problems when building a ramdisk?  I
appreciate any response for this message.
Thanks a lot.
David Meng

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Goswin Brederlow <[email-masked]>
Date: 19 Jun 2000 23:04:26 +0200

>>>>> " " == Meng, David <[email-masked]> writes:

     > Hi George and all: I am using a cross compiler to build a
     > ramdisk.  For the first try, I linked the init, busybox, bash

crosscompiling is ugly for debugging. :(

     > and tinylogin statically. They can work.  And then, I build a
     > hello apps into the ramdisk wit dynamic link.  I also put all
     > the libraries from my cross compiler(glibc-2.1.3) into the
     > ramdisk /lib directory.  I set the permission 777 for the hello
     > executable.  After the linux and ramdisk are up, I tried to
     > execute the hello.  I got an error message like following:
     > bash: ./hello: No such file or directory.  If I statically link
     > the hello, it works fine.

You seem to be missing some library. If any library (or library needed
by another library) isn't loadable, you get this error.

Maybe you forgot ld-linux.so ?

Compile youe hello program and run "ldd hello" to see what libraries you
need.

     > I do not understand why the dynamic linked hello can not work.
     > I believe there are some issues how to use the shared
     > libraries.  Would you or any one else let me know if you meet
     > the same problems when building a ramdisk?  I appreciate any
     > response for this message.  Thanks a lot.  David Meng
 
No such problems (except like forgetting libs or wrong permissions).

What architecture are you building for? Do you have a linux on that
system, so you can setup a chroot to the ramdisk to be? Using chroot
is a quick way to test if a ramdisk would work.

MfG
	Goswin