This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to build a uclibc toolchain with crosstool (was: Question to you from a newbie)


On Fri, Jun 18, 2004 at 01:29:20PM -0400, Dan Strohschein wrote:
> Ok let me see if I get this -
> 
> If I install the patch (and it works) does that mean I do not need to down
> and compile uClibc ?

You do not need to do it as a separate step.

crosstool will download and compile uClibc for you as part of building
the toolchain when you do the
      eval `cat gcc-3.3.3-uclibc-0.9.23.dat mipsel.dat` all.sh
step.

If you do any dynamic linking of target code, you'll then have to copy
the appropriate uClibc dynamic libraries out of the toolchain lib
directory into your target's filesystem by hand when you build a target
filesystem image.  If you link all your target code statically, you
should be good to go once crosstool's all.sh completes successfully.

> Excuse my compete ignorance - I am very new to this.

No worries.

Once the newbie-ishness wears off, you may want to look into
configuring uClibc -- the default configuration should be fine for most
users to start with, but uClibc's strength is the great pains it goes
to in giving you choice to strip out things you don't need, thus
slimming down the library considerably.  Not really an issue if you're
doing a single unified statically linked image with some minimal
embedded RTOS, but for a system with a real Linux kernel, and several
dynamically-linked apps, careful tuning of uClibc config can save a
tremendous amount of flashdisk space.


                            ------Carl

> 
> Thanks
> Dan
> 
> -----Original Message-----
> From: Carl Miller [mailto:chaz@energoncube.net] 
> Sent: Friday, June 18, 2004 12:22 PM
> To: Dan Strohschein; crossgcc
> Subject: Re: How to build a uclibc toolchain with crosstool (was: Question
> to you from a newbie)
> 
> On Fri, Jun 18, 2004 at 08:25:34AM -0700, Dan Kegel wrote:
> > Dan Strohschein wrote:
> > >...  I am currently trying to develop a small application that would
> > >run on a Linksys WRT54G router. This uses a mipsel CPU.
> > >
> > >I downloaded crosstools and compiled/built/installed it for the mipsel 
> > >CPU. I would like to use uClibc for its size with this particular 
> > >embedded system, but I can?t for the life of me figure out HOW to build 
> > >uClibc to work with the crosstools. If you could point me at a resource, 
> > >or perhaps share wisdom of your own on how I could go about 
> > >accomplishing this, I would be very appreciative 
> > 
> > There's a patch in the contrib directory that adds uclibc support
> > to crosstool-0.28-rc5.  It was posted by Carl Miller on 20 April 2004.
> > Try
> >   wget kegel.com/crosstool-0.28-rc5.tar.gz
> >   wget 
> >
> http://kegel.com/crosstool/crosstool-0.28-rc25/contrib/crosstool-uclibc-0.28
> -rc5.patch
> >   tar -xzvf crosstool-0.28-rc5.tar.gz
> >   cd crosstool-0.28-rc5
> >   patch -p1 < ../crosstool-uclibc-0.28-rc5.patch
> >   eval `cat gcc-3.3.3-uclibc-0.9.23.dat mipsel.dat` all.sh
> > 
> > I think Carl only tested it with arm, though, so who knows if that'll 
> > work...
> > - Dan
> 
> ARM7 and PPC405.  And I didn't get enough of a chance to give the ARM7
> version as good a thorough test as I would have liked.  But the PPC405
> seemed to be reasonably solid.  Let me know how MIPS goes; maybe I can
> help if you run into a problem.
> 
> 
>                              ------Carl

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]