* Problems dynamically linking busybox with ppc libs.
@ 2006-08-16 8:53 Keith Redfern
2006-08-16 14:13 ` Ben Warren
2006-08-17 9:48 ` Wolfgang Denk
0 siblings, 2 replies; 4+ messages in thread
From: Keith Redfern @ 2006-08-16 8:53 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]
I am trying to dynamically link busybox with the correct libraries but
run into problems with directory paths and CC/LD flags.
I am using the toolchain supplied with ELDK and my target board is
ppc_8xx based. The busybox version that I am using is 1.1.3.
I see the following in Rules.mak and have been trying different variable
options but with no success.
# To compile vs some other alternative libc, you may need to use/adjust
# the following lines to meet your needs...
#
# If you are using Red Hat 6.x with the compatible RPMs (for developing
under
# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read
about
# using the compatible RPMs (compat-*) at http://www.redhat.com !
#LIBCDIR:=/usr/i386-glibc20-linux
#
# For other libraries, you are on your own. But these may (or may not)
help...
#LDFLAGS+=-nostdlib
#LIBRARIES:=$(LIBCDIR)/lib/libc.so.6
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
-funsigned-char
#GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install:
\(.*\)/\1include/gp")
#
# For other libraries, you are on your own. But these may (or may not)
help...
Is this the correct place to make modifications?
Has anyone already figured the changes required to get this to work with
ELDK toolchain?
Any insight would be useful.
......Keith
Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message
[-- Attachment #2: Type: text/html, Size: 8370 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems dynamically linking busybox with ppc libs.
2006-08-16 8:53 Problems dynamically linking busybox with ppc libs Keith Redfern
@ 2006-08-16 14:13 ` Ben Warren
2006-08-17 9:48 ` Wolfgang Denk
1 sibling, 0 replies; 4+ messages in thread
From: Ben Warren @ 2006-08-16 14:13 UTC (permalink / raw)
To: Keith Redfern; +Cc: linuxppc-embedded
Keith,
On Wed, 2006-08-16 at 10:53 +0200, Keith Redfern wrote:
> I am trying to dynamically link busybox with the correct libraries but
> run into problems with directory paths and CC/LD flags.
>
> I am using the toolchain supplied with ELDK and my target board is
> ppc_8xx based. The busybox version that I am using is 1.1.3.
>
<snip>
>
> Is this the correct place to make modifications?
>
> Has anyone already figured the changes required to get this to work
> with ELDK toolchain?
>
> Any insight would be useful.
>
>
>
> ...…Keith
I have busybox 1.2 building under ELDK 4.0, and didn't mess at all with
the Make system, and am building for a ppc_6xx- target. I realize this
isn't quite your setup, but is pretty close.
As long as you have the tools listed in your PATH (in my
case /opt/tools/eldk4.0/usr/bin:/opt/tools/eldk4.0/bin), you should be
able to build fine using 'make menuconfig'. Just go to 'Busybox
Settings->Build Options' and select 'Do you want to build BusyBox with a
Cross Compiler?', in your case entering 'ppc_8xx-' or whatever the
prefix is for your CPU.
regards,
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems dynamically linking busybox with ppc libs.
2006-08-16 8:53 Problems dynamically linking busybox with ppc libs Keith Redfern
2006-08-16 14:13 ` Ben Warren
@ 2006-08-17 9:48 ` Wolfgang Denk
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-08-17 9:48 UTC (permalink / raw)
To: Keith Redfern; +Cc: linuxppc-embedded
In message <367F3B3911959C4DA9991C00166F620C1DE208@EUDUCEX2.europe.ad.flextronics.com> you wrote:
>
> I am trying to dynamically link busybox with the correct libraries but>
> run into problems with directory paths and CC/LD flags.
Maybe you do too much?
> I am using the toolchain supplied with ELDK and my target board is
> ppc_8xx based. The busybox version that I am using is 1.1.3.
> I see the following in Rules.mak and have been trying different variable>
> options but with no success.
You are not supposed to meddle with Rules.mk. Also, this is not
necessary at all.
> Is this the correct place to make modifications?
No. No modifications are necessary.
Just run a standard configuration and make sure to select cross
compilation with "ppc_8xx-" as Cross Compiler prefix, i. e.:
-> cd /tmp
-> wget http://busybox.net/downloads/busybox-1.1.3.tar.bz2
-> tar jxf busybox-1.1.3.tar.bz2
-> cd busybox-1.1.3
-> export CROSS_COMPILE=ppc_8xx-
-> make config
...
*
* Build Options
*
...
Do you want to build BusyBox with a Cross Compiler?
(USING_CROSS_COMPILER) [N/y/?] (NEW) y
Cross Compiler prefix (CROSS_COMPILER_PREFIX) [/usr/i386-linux-uclibc/bin/i386-uclibc-] (NEW) ppc_8xx-
Any extra CFLAGS options for the compiler? (EXTRA_CFLAGS_OPTIONS) [] (NEW)
...
-> make
...
LINK busybox_unstripped
STRIP busybox
...
This is so straightforward that I wonder what you moight have done to
run into problems...
> Has anyone already figured the changes required to get this to work with
> ELDK toolchain?
Yes. And if had bothered to check how the busybox RPM was build which
comes included with the ELDK (for example by looking at it's spec
file), then you should have known, too.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Our business is run on trust. We trust you will pay in advance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Problems dynamically linking busybox with ppc libs.
@ 2006-08-17 11:29 Keith Redfern
0 siblings, 0 replies; 4+ messages in thread
From: Keith Redfern @ 2006-08-17 11:29 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-embedded
I have just realised that I was barking up the wrong tree in regard to=0D=
=0A
this issue. =0D=0A
=0D=0A
My problem turned out not to be a issue with compiling/linking Busybox=0D=
=0A
but that my target was using different libraries to what was specified=0D=
=0A
in my ELDK. I am a newbie to embedded Linux and now understand that this=0D=
=0A
is a fundamental step in getting a working system. =0D=0A
=0D=0A
My confusion came about as my ELDK is not a standard ELDK but came as a=0D=
=0A
BSP from Embedded Planet 852T. Embedded Planet supply a pre-formed=0D=0A
ramdisk image with libraries, Busybox executable, initialisation scripts=0D=
=0A
etc. =0D=0A
=0D=0A
Any executables supplied in this pre-formed ram disk worked fine. An=0D=0A
initial test of the system showed that Busybox worked fine. =0D=0A
=0D=0A
They have scripts that reverse engineer this to a folder and suggest=0D=0A
just making additions/modifications to this folder and then run another=0D=
=0A
script to create a new RAM disk image.=0D=0A
=0D=0A
I didn't see Busybox packaged with the BSP so I downloaded v1.1.3 from=0D=
=0A
the web and started working with it, using the ELDK to build. After this=0D=
=0A
it didn't work. I have now figured out that any new executables built=0D=0A
using the ELDK don't work as they are referencing different versions of=0D=
=0A
the libraries. The pre-formed busybox worked fine as it was built=0D=0A
referencing the libraries in the also pre-formed library directory.=0D=0A
=0D=0A
I don't know why Embedded Planet would have different library versions=0D=
=0A
in the pre-formed library directory and the ELDK! Maybe there to trick=0D=
=0A
newbies!=0D=0A
=0D=0A
Doing a standard Busybox 'make' with no modifications to the make files=0D=
=0A
and aligning the target libraries with that provided as part of the ELDK=0D=
=0A
solved the problem.=0D=0A
=0D=0A
Thanks for help on this ......... Keith.=0D=0A
=0D=0A
-----Original Message-----=0D=0A
From: Wolfgang Denk [mailto:wd@denx.de] =0D=0A
Sent: 17 August 2006 10:48=0D=0A
To: Keith Redfern=0D=0A
Cc: linuxppc-embedded@ozlabs.org=0D=0A
Subject: Re: Problems dynamically linking busybox with ppc libs. =0D=0A
=0D=0A
In message=0D=0A
<367F3B3911959C4DA9991C00166F620C1DE208@EUDUCEX2.europe.ad.flextronics.c=0D=
=0A
om> you wrote:=0D=0A
> =0D=0A
> I am trying to dynamically link busybox with the correct libraries=0D=0A
but> =0D=0A
> run into problems with directory paths and CC/LD flags.=0D=0A
=0D=0A
Maybe you do too much?=0D=0A
=0D=0A
> I am using the toolchain supplied with ELDK and my target board is=0D=0A
> ppc_8xx based. The busybox version that I am using is 1.1.3.=0D=0A
=0D=0A
> I see the following in Rules.mak and have been trying different=0D=0A
variable> =0D=0A
> options but with no success.=0D=0A
=0D=0A
You are not supposed to meddle with Rules.mk. Also, this is not=0D=0A
necessary at all.=0D=0A
=0D=0A
> Is this the correct place to make modifications?=0D=0A
=0D=0A
No. No modifications are necessary.=0D=0A
=0D=0A
Just run a standard configuration and make sure to select cross=0D=0A
compilation with "ppc_8xx-" as Cross Compiler prefix, i. e.:=0D=0A
=0D=0A
-> cd /tmp=0D=0A
-> wget http://busybox.net/downloads/busybox-1.1.3.tar.bz2=0D=0A
-> tar jxf busybox-1.1.3.tar.bz2=0D=0A
-> cd busybox-1.1.3=0D=0A
-> export CROSS_COMPILE=3Dppc_8xx-=0D=0A
-> make config=0D=0A
...=0D=0A
*=0D=0A
* Build Options=0D=0A
*=0D=0A
...=0D=0A
Do you want to build BusyBox with a Cross Compiler?=0D=0A
(USING_CROSS_COMPILER) [N/y/?] (NEW) y=0D=0A
Cross Compiler prefix (CROSS_COMPILER_PREFIX)=0D=0A
[/usr/i386-linux-uclibc/bin/i386-uclibc-] (NEW) ppc_8xx-=0D=0A
Any extra CFLAGS options for the compiler? (EXTRA_CFLAGS_OPTIONS) []=0D=0A
(NEW)=0D=0A
...=0D=0A
-> make=0D=0A
...=0D=0A
LINK busybox_unstripped=0D=0A
STRIP busybox=0D=0A
...=0D=0A
=0D=0A
This is so straightforward that I wonder what you moight have done to=0D=0A
run into problems...=0D=0A
=0D=0A
=0D=0A
> Has anyone already figured the changes required to get this to work=0D=0A
with=0D=0A
> ELDK toolchain?=0D=0A
=0D=0A
Yes. And if had bothered to check how the busybox RPM was build which=0D=0A
comes included with the ELDK (for example by looking at it's spec=0D=0A
file), then you should have known, too.=0D=0A
=0D=0A
Best regards,=0D=0A
=0D=0A
Wolfgang Denk=0D=0A
=0D=0A
-- =0D=0A
Software Engineering: Embedded and Realtime Systems, Embedded Linux=0D=0A
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de=0D=0A
Our business is run on trust. We trust you will pay in advance.=0D=0A
=0D=0A
Legal Disclaimer:=0A
The information contained in this message may be privileged and confident=
ial. It is intended to be read only by the individual or entity to whom i=
t is addressed or by their designee. If the reader of this message is not=
the intended recipient, you are on notice that any distribution of this =
message, in any form, is strictly prohibited. If you have received this m=
essage in error, please immediately notify the sender and delete or destr=
oy any copy of this message=0D=0A
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-17 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-16 8:53 Problems dynamically linking busybox with ppc libs Keith Redfern
2006-08-16 14:13 ` Ben Warren
2006-08-17 9:48 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2006-08-17 11:29 Keith Redfern
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).