Skip to contentSkip to conversation

busybox source

DISCUSSION Prakash kanthi 7 participants 10 messages Jan 22, 2003 – Jan 24, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Folks,

Does anyone know where i can download the source for busybox used in denx ramdisk-image?

thanks,
Prakash

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw

Hello,

in ftp://ftp.lineo.com/pub/busybox/,
you can get busybox source all versions.

Cheers

----- Original Message -----
From: "Prakash kanthi" <[email protected]>
To: "PPC-Linux list (E-mail)" <[email protected]>
Sent: Wednesday, January 22, 2003 9:05 AM
Subject: busybox source

Quoted 11 lines

Hi Folks,

Does anyone know where i can download the source for busybox used in denx ramdisk-image?

thanks,
Prakash

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Prakash kanthi
Quoted 3 lines · In message <[email protected]> you wrote:

Does anyone know where i can download the source for busybox used in denx ramdisk-image?

The ELDK documentation at http://www.denx.de/re/ELDK.html explains where you can download _all_ the ELDK sources from our CVS server.

And of course you can always get busybox directly at ftp://ftp.lineo.com/pub/busybox/

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Drun'? 'm not drun'! You woudn' dare call m' drun' if I was sober!
- Terry Pratchett, _Men at Arms_

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw

Linux Kernel hangs after execve("/bin/sh")

Hi FOlks,

I finally reached the last step (hopefully) of linux kernel booting process. Kernel gets stuck after doing a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following is the output. You can see that, execve goes through without any file permission problems and subsequently it tries to open /lib/ld.so.1 flawlessly. After that i see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh
open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

I wrote a small standalone program hello.c to test, if i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it to my ramdisk and called from init(). Following is the output. You can see that, it did all of it that it did for /bin/sh and also tried to open /etc/ld.so.preload and /etc/ld.so.cache and failed. But again towards the end, it tries to open /lib/libc.so.6 and succeds but still no output is displayed that hello.c is trying to print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2.
sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2.
sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Can someone please throw some light on this?

Thanks,
Prakash

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#5 lore raw

Re: Linux Kernel hangs after execve("/bin/sh")

On Wed, Jan 22, 2003 at 01:15:32AM -0800, Prakash kanthi wrote:

| I wrote a small standalone program hello.c to test, if
| i can dynamically load it from init() instead of
| loading /bin/sh. I compiled the program added it to my
| ramdisk and called from init(). Following is the
| output. You can see that, it did all of it that it did
| for /bin/sh and also tried to open /etc/ld.so.preload
| and /etc/ld.so.cache and failed. But again towards the
| end, it tries to open /lib/libc.so.6 and succeds but
| still no output is displayed that hello.c is trying to
| print.

Quite sometime back, I had run into similar problem. init=/bin/bash would not work, but init=/bin/helloworld would work. Later, I realized that the board did not have FPU, and I had to pass relevant flags to glibc, while compilation. The same might be the case with your board.

--
Chirag Kantharia, symonds.net/~chyrag/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#6 lore raw

Re: Linux Kernel hangs after execve('/bin/sh')

In reply to Prakash kanthi

Prakash,

Try compiling your hello.c program with the -Bstatic flag. That will eliminate the need to load libraries, and should show if there are other problems. If that works OK then we can focus on why your library loading is failing.

Regards,
Daris Nevil

Quoted 69 lines · Prakash kanthi

Hi FOlks,

I finally reached the last step (hopefully) of linux kernel booting process. Kernel gets stuck after doing a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following is the output. You can see that, execve goes through without any file permission problems and subsequently it tries to open /lib/ld.so.1 flawlessly. After that i see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh
open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

I wrote a small standalone program hello.c to test, if i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it to my ramdisk and called from init(). Following is the output. You can see that, it did all of it that it did for /bin/sh and also tried to open /etc/ld.so.preload and /etc/ld.so.cache and failed. But again towards the end, it tries to open /lib/libc.so.6 and succeds but still no output is displayed that hello.c is trying to print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2.
sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2.
sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Quoted 6 lines

Can someone please throw some light on this?

Thanks,
Prakash

Daris A Nevil
Simple Network Magic Corporation
401 Kentucky
McKinney, Texas 75069
http://www.snmc.com
972-562-3751

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#7 lore raw

Re: Linux Kernel hangs after execve('/bin/sh')

Hurray .......

Daris, you suggestion seem to work. I Compiled my hello.c with -Bstatic (size was almost 1MB), added it to ramdisk and it works. So now the problem is narrowed down to, being not able to work with the shared libraries.

One point is that, i DID NOT get any errors (atleast on the screen) while execve was loading shared libraries in the process of executing /bin/sh. But for sure, my problem is related to it.

I really appreciate any suggestions related to this issue.

Thanks,
Prakash

Quoted 105 lines · --- Daris A Nevil

Prakash,

Try compiling your hello.c program with the -Bstatic flag. That will
eliminate the need to load libraries, and should show if there are other
problems. If that works OK then we can focus on why your library loading
is failing.

Regards,
Daris Nevil

Quoted 4 lines · Prakash kanthi

Hi FOlks,

I finally reached the last step (hopefully) of

linux

Quoted 1 line

kernel booting process. Kernel gets stuck after

doing

Quoted 5 lines

a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following

is

Quoted 2 lines

the output. You can see that, execve goes through without any file permission problems and

subsequently

Quoted 1 line

it tries to open /lib/ld.so.1 flawlessly. After

that i

Quoted 17 lines

see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

Quoted 1 line

I wrote a small standalone program hello.c to

test, if

Quoted 2 lines

i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it

to my

Quoted 2 lines

ramdisk and called from init(). Following is the output. You can see that, it did all of it that it

did

Quoted 1 line

for /bin/sh and also tried to open

/etc/ld.so.preload

Quoted 1 line

and /etc/ld.so.cache and failed. But again towards

the

Quoted 1 line

end, it tries to open /lib/libc.so.6 and succeds

but

Quoted 1 line

still no output is displayed that hello.c is

trying to

Quoted 30 lines

print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2. sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2. sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Quoted 6 lines

Can someone please throw some light on this?

Thanks,
Prakash

Quoted 9 lines

Daris A Nevil
Simple Network Magic Corporation
401 Kentucky
McKinney, Texas 75069
http://www.snmc.com
972-562-3751

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#8 lore raw

Re: Linux Kernel hangs after execve('/bin/sh')

Prakash,

I had the same trouble -- in my case, a couple of different ways.

try compiling without -Bstatic, but do 2 different trials:
compile your test
-msoft-float and -mhard-float -- if either of these works then the libraries you've got on your ram disk are either floating point emulation, or hardware FP, respectively. the compile must match the libs in terms of floating point.l

the other things to look at are which libs you've got in your ram disk. if you've cut it down you might have cut it down too far. I'm running w/ the ELDK /lib and /usr/lib w/o
anything removed. try that until you get things working and
then you can explore which packages need what libs.

Mark

Quoted 14 lines · Prakash kanthi

Hurray .......

Daris, you suggestion seem to work. I Compiled my hello.c with -Bstatic (size was almost 1MB), added it to ramdisk and it works. So now the problem is narrowed down to, being not able to work with the shared libraries.

One point is that, i DID NOT get any errors (atleast on the screen) while execve was loading shared libraries in the process of executing /bin/sh. But for sure, my problem is related to it.

Quoted 122 lines

I really appreciate any suggestions related to this issue.

Thanks,
Prakash

Quoted 114 lines · --- Daris A Nevil

Prakash,

Try compiling your hello.c program with the -Bstatic flag. That will
eliminate the need to load libraries, and should show if there are other
problems. If that works OK then we can focus on why your library loading
is failing.

Regards,
Daris Nevil

Quoted 4 lines · Prakash kanthi

Hi FOlks,

I finally reached the last step (hopefully) of

linux

Quoted 1 line

kernel booting process. Kernel gets stuck after

doing

Quoted 5 lines

a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following

is

Quoted 2 lines

the output. You can see that, execve goes through without any file permission problems and

subsequently

Quoted 1 line

it tries to open /lib/ld.so.1 flawlessly. After

that i

Quoted 17 lines

see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

Quoted 1 line

I wrote a small standalone program hello.c to

test, if

Quoted 2 lines

i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it

to my

Quoted 2 lines

ramdisk and called from init(). Following is the output. You can see that, it did all of it that it

did

Quoted 1 line

for /bin/sh and also tried to open

/etc/ld.so.preload

Quoted 1 line

and /etc/ld.so.cache and failed. But again towards

the

Quoted 1 line

end, it tries to open /lib/libc.so.6 and succeds

but

Quoted 1 line

still no output is displayed that hello.c is

trying to

Quoted 30 lines

print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2. sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2. sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Quoted 6 lines

Can someone please throw some light on this?

Thanks,
Prakash

Daris A Nevil
Simple Network Magic Corporation
401 Kentucky
McKinney, Texas 75069
http://www.snmc.com
972-562-3751

--
Mark Pilon
Minolta-QMS

P.O. Box 37
325 Dawson County Road 227
Fallon, MT. 59326-0037
1-406-486-5539 (primary voice line)
1-406-853-0433 (cell)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#9 lore raw

Re: Linux Kernel hangs after execve("/bin/sh")

In reply to Prakash kanthi
Quoted 68 lines · Prakash kanthi

Hi FOlks,

I finally reached the last step (hopefully) of linux kernel booting process. Kernel gets stuck after doing a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following is the output. You can see that, execve goes through without any file permission problems and subsequently it tries to open /lib/ld.so.1 flawlessly. After that i see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh
open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

I wrote a small standalone program hello.c to test, if i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it to my ramdisk and called from init(). Following is the output. You can see that, it did all of it that it did for /bin/sh and also tried to open /etc/ld.so.preload and /etc/ld.so.cache and failed. But again towards the end, it tries to open /lib/libc.so.6 and succeds but still no output is displayed that hello.c is trying to print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2.
sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2.
sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Quoted 7 lines

Can someone please throw some light on this?

Thanks,
Prakash

Hello Prakash,

I have had similar problem with HardHat Linux, but when
I have changed to ElinOS distribution from SYSGO corporation, all works well. But I have find a little "HOWTO" to solve this problem in HardHat Linux, may be it will help you a bit.
I am sorry I am not posting URL link to this document, because I don't remember it, but I think document is not so large so I am attaching it. Once more, I apologize to other people who are not interested in this problem.

                                                     By,
                                                                    Jan
#10 lore raw

Re: Linux Kernel hangs after execve("/bin/sh")

Hi Jan,

Thanks for the information. But the thing is, i don't see any error messages on my console to confirm that the dynamic library loading is failing.

However, i think the first solution you suggested is worth trying. Where can i get sash source code?

thanks,
Prakash

Quoted 107 lines · --- Jan Damborsky
Quoted 3 lines · Prakash kanthi

Hi FOlks,

I finally reached the last step (hopefully) of

linux

Quoted 1 line

kernel booting process. Kernel gets stuck after

doing

Quoted 7 lines

a 'execve("/bin/sh")'. I tried using different ramdisks, still no difference.

I added few printk's in the source, following the function call path from 'execve' call. Following is the output. You can see that, execve goes through without any file permission problems and

subsequently

Quoted 1 line

it tries to open /lib/ld.so.1 flawlessly. After

that i

Quoted 17 lines

see nothing on the terminal.

---------
init:Trying to bring /bin/sh up. do_execve:enter for /bin/sh
open_exec:enter for /bin/sh. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0
-----------

Quoted 1 line

I wrote a small standalone program hello.c to test,

if

Quoted 2 lines

i can dynamically load it from init() instead of loading /bin/sh. I compiled the program added it to

my

Quoted 2 lines

ramdisk and called from init(). Following is the output. You can see that, it did all of it that it

did

Quoted 1 line

for /bin/sh and also tried to open

/etc/ld.so.preload

Quoted 1 line

and /etc/ld.so.cache and failed. But again towards

the

Quoted 1 line

end, it tries to open /lib/libc.so.6 and succeds

but

Quoted 1 line

still no output is displayed that hello.c is trying

to

Quoted 30 lines

print.

---------
init:Trying to bring /bin/hello up. do_execve:enter for /bin/hello open_exec:enter for /bin/hello. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0 open_exec:enter for /lib/ld.so.1. open_exec:Permission error=0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
do_execve: after search_binary_handler. retval=0 sys_open:enter for /etc/ld.so.preload. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.preload. filp_open:open_namei error -2. sys_open:enter for /etc/ld.so.cache. sys_open:unused_fd=3.
filp_open:enter for /etc/ld.so.cache. filp_open:open_namei error -2. sys_open:enter for /lib/libc.so.6. sys_open:unused_fd=3.
filp_open:enter for /lib/libc.so.6. filp_open:open_namei error 0. dentry_open:enter.
dentry_open: after file->f_op->open. 0
-----------

Quoted 7 lines

Can someone please throw some light on this?

Thanks,
Prakash

Hello Prakash,

I have had similar problem with HardHat Linux, but when
I have changed to ElinOS distribution from SYSGO corporation,
all works well. But I have find a little "HOWTO" to solve this
problem in HardHat Linux, may be it will help you a bit.
I am sorry I am not posting URL link to this document,
because I don't remember it, but I think document is not
so large so I am attaching it. Once more, I
apologize to other people
who are not interested in this problem.

Quoted 8 lines

By,

Jan

ATTACHMENT part 2 application/x-zip-compressed

name=LoadingSharedLibraryInHardHat.zip

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/