Re: [gentoo-user] crosscompiling...the point of view

2012-08-07 Thread YoYo Siska
On Mon, Aug 06, 2012 at 06:37:07PM +0200, meino.cra...@gmx.de wrote:
> Paul Hartman  [12-08-06 17:36]:
> > On Mon, Aug 6, 2012 at 8:01 AM,   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



Re: [gentoo-user] crosscompiling...the point of view

2012-08-06 Thread Daniel Wagener
On Mon, 6 Aug 2012 15:01:40 +0200
meino.cra...@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. :)



Re: [gentoo-user] crosscompiling...the point of view

2012-08-06 Thread meino . cramer
Paul Hartman  [12-08-06 17:36]:
> On Mon, Aug 6, 2012 at 8:01 AM,   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





Re: [gentoo-user] crosscompiling...the point of view

2012-08-06 Thread Paul Hartman
On Mon, Aug 6, 2012 at 8:01 AM,   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.



Re: [gentoo-user] Crosscompiling

2005-05-04 Thread Jan Hübner
>
>
>I understand that too, but: whatever I compile in the chroot will have
>to run on my P4 for a while until it's done. Like the complete toolchain
>and some others. But if everybody says that's all fine I'll believe that.
>  
>

My thought is the following: the system in the chroot utilizes the
binaries in the chroot. So if those are made for another arch they will
not run any longer on the real hardware? Where is my mistake in thinking
if any?

Jan
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-04 Thread Jan Hübner
Nick Rout wrote:

>whatever you do in the chroot will not affect your system outside the
>chroot (except where you have remounted stuff like /usr/portage and
>/proc)
>  
>
Yes, I know and understand that.

>therefore you can set CFLAGS to whatever you like inside the chroot, and 
>compile for athlon in there, leaving your P4 setup intact on your base
>system. 
>  
>
I understand that too, but: whatever I compile in the chroot will have
to run on my P4 for a while until it's done. Like the complete toolchain
and some others. But if everybody says that's all fine I'll believe that..

Jan
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-02 Thread Nick Rout
whatever you do in the chroot will not affect your system outside the
chroot (except where you have remounted stuff like /usr/portage and
/proc)

therefore you can set CFLAGS to whatever you like inside the chroot, and 
compile for athlon in there, leaving your P4 setup intact on your base
system. 


On Mon, 02 May 2005 19:45:06 +0200
Jan Hübner wrote:

> Nick Rout wrote:
> 
> >relatively simple. the general idea is thus:
> >  
> >
> Ok, thank you. The main concern I had were concerning the CFLAGS,
> because I think after building say coreutils in the chroot for Athlon
> they will not work any longer on my P4 but I need them in the chroot, no?
> 
> Jan
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Nick Rout


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-02 Thread Jan Hübner
I thought a bit about it and came to the conclusion that doing the
install just like normal is the way to go, all in a single dir
somewhere. For CFLAGS i will go with march=i686 and mtune=athlon-tbird,
think that will keep compatibility with my home setup and will also
optimize for remote arch.

Comments?

Jan
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-02 Thread Jan Hübner
Nick Rout wrote:

>relatively simple. the general idea is thus:
>  
>
Ok, thank you. The main concern I had were concerning the CFLAGS,
because I think after building say coreutils in the chroot for Athlon
they will not work any longer on my P4 but I need them in the chroot, no?

Jan
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-02 Thread Jan Hübner
Keziah W wrote:

>Maybe this will help?
>http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
>
Interesting, I will read. Thank you!

Jan
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-01 Thread Keziah W
Maybe this will help?
http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-01 Thread Nick Rout
relatively simple. the general idea is thus:

1. make a directory, say

mkdir /mnt/target

2. untar a stage3 tarball into there, for the architecture you want.

3. mount various directories

mount -t proc none /mnt/target/proc
mount -o bind /usr/portage /mnt/target/usr/portage
cp /etc/resolv.conf /mnt/target/etc/resolv.conf

4. chroot

su
chroot /mnt/target /bin/bash

then carry on as per the install instructions. Do not reinstall grub as
you will screw your existing setup.

When finished tar up /mnt/target and transfer to the new machine. setup
grub. go.

Actually though you would find it easier to use the recent 2005.0
packages cd.


On Sun, 01 May 2005 17:39:43 +0200
Jan Hübner wrote:

> Hello there,
> 
> I want to build a complete Gentoo system on my PC to save a friend the
> time for compiling. The question I have is: what do I need to take care
> of if my machine is a Pentium 4 and his is an Athlon? I know that if I
> choose my CFLAGS like march=i686 the code will run on both machines, but
> i want to optimizie for his architecture.
> 
> Any hints? Thanks in advance and sorry for my bad english ;)
> 
> Jan
> 
> 
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Nick Rout
Barrister & Solicitor
Christchurch

<[EMAIL PROTECTED]>


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Crosscompiling

2005-05-01 Thread Mark Knecht
Jan,
   I think this is the same thing I want to know about. I run Gentoo
but want to try running it on my XBox. In general I am guessing we
handle it jsut like a normal install. Make a directory that will
represent the root of the new system, then chroot into it and work
only in there. That's just a guess though.

   I'm interested in hearing how to do it right.

- Mark

On 5/1/05, Jan Hübner <[EMAIL PROTECTED]> wrote:
> Hello there,
> 
> I want to build a complete Gentoo system on my PC to save a friend the
> time for compiling. The question I have is: what do I need to take care
> of if my machine is a Pentium 4 and his is an Athlon? I know that if I
> choose my CFLAGS like march=i686 the code will run on both machines, but
> i want to optimizie for his architecture.
> 
> Any hints? Thanks in advance and sorry for my bad english ;)
> 
> Jan
> 
> --
> gentoo-user@gentoo.org mailing list
> 
>

-- 
gentoo-user@gentoo.org mailing list