FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-06-2012, 01:01 PM
 
Default crosscompiling...the point of view

Hi,

I am asking, because I found not only one description of somehow
complicated setups to compile a distribution (namely gentoo) for a
platform "A" (Beaglebone TI OMAP4) on that platform with distcc to
speedup things or with emulated chroot environments based on qemu...

I thought it would be the easiest to compile the whole stuff on a host
system "B" with a crosscompilation toolchain...but may be I have
overlooked something important...

So - is there any logical reason, which prevents the process of the
compilation of a complete distribution/rootfs/boot-mechanism for
a platform "A" on a hostsystem of the platform "B" if the cross
compilation toolchain is already installed on "B" and no emulated
environment is wanted?

Thank you very much in advance for any help!
Best regards,
mcc
 
Old 08-06-2012, 03:30 PM
Paul Hartman
 
Default crosscompiling...the point of view

On Mon, Aug 6, 2012 at 8:01 AM, <meino.cramer@gmx.de> wrote:
> Hi,
>
> I am asking, because I found not only one description of somehow
> complicated setups to compile a distribution (namely gentoo) for a
> platform "A" (Beaglebone TI OMAP4) on that platform with distcc to
> speedup things or with emulated chroot environments based on qemu...
>
> I thought it would be the easiest to compile the whole stuff on a host
> system "B" with a crosscompilation toolchain...but may be I have
> overlooked something important...

Seems the best way to me, too.

> So - is there any logical reason, which prevents the process of the
> compilation of a complete distribution/rootfs/boot-mechanism for
> a platform "A" on a hostsystem of the platform "B" if the cross
> compilation toolchain is already installed on "B" and no emulated
> environment is wanted?

So you want to "install" the packages into a virtual filesystem image
on the compiler machine to create a whole disk image for the target,
basically? Hmmm. Maybe something like Scratchbox can help with this.
 
Old 08-06-2012, 04:15 PM
Daniel Wagener
 
Default crosscompiling...the point of view

On Mon, 6 Aug 2012 15:01:40 +0200
meino.cramer@gmx.de wrote:

> So - is there any logical reason, which prevents the process of the
> compilation of a complete distribution/rootfs/boot-mechanism for
> a platform "A" on a hostsystem of the platform "B" if the cross
> compilation toolchain is already installed on "B" and no emulated
> environment is wanted?

I know that it is possible, though I have not done it myself yet.
And unfortunately, the examples I know of were built with openembedded (prime example for beagleboard: Angstrom) and I do not the slightest idea how that would work on Gentoo.
But I would love to know.
 
Old 08-06-2012, 04:37 PM
 
Default crosscompiling...the point of view

Paul Hartman <paul.hartman+gentoo@gmail.com> [12-08-06 17:36]:
> On Mon, Aug 6, 2012 at 8:01 AM, <meino.cramer@gmx.de> wrote:
> > Hi,
> >
> > I am asking, because I found not only one description of somehow
> > complicated setups to compile a distribution (namely gentoo) for a
> > platform "A" (Beaglebone TI OMAP4) on that platform with distcc to
> > speedup things or with emulated chroot environments based on qemu...
> >
> > I thought it would be the easiest to compile the whole stuff on a host
> > system "B" with a crosscompilation toolchain...but may be I have
> > overlooked something important...
>
> Seems the best way to me, too.
>
> > So - is there any logical reason, which prevents the process of the
> > compilation of a complete distribution/rootfs/boot-mechanism for
> > a platform "A" on a hostsystem of the platform "B" if the cross
> > compilation toolchain is already installed on "B" and no emulated
> > environment is wanted?
>
> So you want to "install" the packages into a virtual filesystem image
> on the compiler machine to create a whole disk image for the target,
> basically? Hmmm. Maybe something like Scratchbox can help with this.
>
Hi Paul,

...yes, exactly. But theproblem remains...is there a logical reason,
which renders this attempt useless ?

Best regards,
mcc
 
Old 08-07-2012, 01:36 PM
YoYo Siska
 
Default crosscompiling...the point of view

On Mon, Aug 06, 2012 at 06:37:07PM +0200, meino.cramer@gmx.de wrote:
> Paul Hartman <paul.hartman+gentoo@gmail.com> [12-08-06 17:36]:
> > On Mon, Aug 6, 2012 at 8:01 AM, <meino.cramer@gmx.de> wrote:
> > > Hi,
> > >
> > > I am asking, because I found not only one description of somehow
> > > complicated setups to compile a distribution (namely gentoo) for a
> > > platform "A" (Beaglebone TI OMAP4) on that platform with distcc to
> > > speedup things or with emulated chroot environments based on qemu...
> > >
> > > I thought it would be the easiest to compile the whole stuff on a host
> > > system "B" with a crosscompilation toolchain...but may be I have
> > > overlooked something important...
> >
> > Seems the best way to me, too.
> >
> > > So - is there any logical reason, which prevents the process of the
> > > compilation of a complete distribution/rootfs/boot-mechanism for
> > > a platform "A" on a hostsystem of the platform "B" if the cross
> > > compilation toolchain is already installed on "B" and no emulated
> > > environment is wanted?
> >
> > So you want to "install" the packages into a virtual filesystem image
> > on the compiler machine to create a whole disk image for the target,
> > basically? Hmmm. Maybe something like Scratchbox can help with this.
> >
> Hi Paul,
>
> ...yes, exactly. But theproblem remains...is there a logical reason,
> which renders this attempt useless ?

Crosscompilation is the preffered way, but there can be a lot of
problems with it . The cross-toolchain isn't a problem, gennto has a
nice tool called crossdev that will generate it for you and with a bit
of env. variables and make.conf tweaks, you can easily do cross-compile
emerges into a specific sysroot (gentoo has nice documentation at [1])

The problem is usually with build systems that don't take
croos-compilation into account: things like getting paths wrong
(including the path to the root of your croscompiled stuff or using
paths in your host system, (older libtool used to generate .la files
with paths in your host system)), using information from your life
system instead of the target system, not correctly handling cases where,
as part of the installation, tools are compiled that are then directly
executed. Most build systems have ways to correctly express these
things, but authors often get them wrong etc...

Then there are cases where some post-installation steps are required to
be run in the target system (remeber those "Updating desktop mime
database " or "Updating shared mime info database" messages after most
desktop apps ?) that usually require executing the installed programs,
which means that either a host version has to be compiled (which can
correctly work with stuff in the targe root directory) or they have to
be somehow started on the first boot of the target system.

Because of this, doing it in an emulated enviroment or on the actual
device makes most of these problems go away. So if somebody doesn't
have time to sort out these cross compilation problems but doesn't mind
if the installation runs few times longer (but without problems), its
better for them...

I last did a cross compiled install of gentoo about two years ago,
mostly it was without any problems, though there were some problematic
packages (IIRC python used to be a problematic one, not sure how it is now).
Recently I have done a few "emulated root" installs and they went
absolutely without any problems (at least as far the 'compile packages
and get a rootfs) step is concerned... getting things to run correctly
on an embedded device without any display etc has its own challenges

yoyo




[1] http://www.gentoo.org/proj/en/base/embedded/cross-development.xml
 

Thread Tools




All times are GMT. The time now is 07:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org