Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Catalyst (http://www.linux-archive.org/gentoo-catalyst/)
-   -   cross compilling for arm cpu (http://www.linux-archive.org/gentoo-catalyst/690622-cross-compilling-arm-cpu.html)

Cédric Caron 08-04-2012 07:46 PM

cross compilling for arm cpu
 
Hello,
*
I used catalyst to cross compile a stage4 for my Raspberry Pi but this seems to require some manual step to work.
*
Is anybody currently working on adding arm cross compiling support to catalyst.
*
Best regards
*
Cédric

Peter Stuge 08-04-2012 08:10 PM

cross compilling for arm cpu
 
Cédric Caron wrote:
> I used catalyst to cross compile a stage4 for my Raspberry Pi but
> this seems to require some manual step to work.

So what was your solution?


> Is anybody currently working on adding arm cross compiling support
> to catalyst.

I don't think actively no.


//Peter

Cédric Caron 08-04-2012 09:41 PM

cross compilling for arm cpu
 
> So what was your solution?

I user qemu-user to run the arm binary and distcc to use a native cross compiler.

The only problem is making chroot working with arm binary. The solution is to copy /usr/bin/qemu-static-arm and /usr/bin/qemu-static-arm-binfmt in the chroot directory.

I used this solution to build a simple stage4 with x11 for my Raspberry Pi.

You also need to modify chroot-functions.sh to fix a problem in get_libdir(). For now I just hardcoded the returned value.
https://bugs.gentoo.org/show_bug.cgi?id=429626

> I don't think actively no.

My solution only requires copying 2 files and deleting them at the end. This should not be difficult to add.

I can add a new option in catalyst to make this possible but I will need some help to do it properly. I never programed in python and my knowledge in bash is limited.

Cédric

Raúl Porcel 08-05-2012 03:30 PM

cross compilling for arm cpu
 
On 08/04/12 23:41, Cédric Caron wrote:

So what was your solution?


I user qemu-user to run the arm binary and distcc to use a native cross compiler.

The only problem is making chroot working with arm binary. The solution is to copy /usr/bin/qemu-static-arm and /usr/bin/qemu-static-arm-binfmt in the chroot directory.

I used this solution to build a simple stage4 with x11 for my Raspberry Pi.

You also need to modify chroot-functions.sh to fix a problem in get_libdir(). For now I just hardcoded the returned value.
https://bugs.gentoo.org/show_bug.cgi?id=429626


I don't think actively no.


My solution only requires copying 2 files and deleting them at the end. This should not be difficult to add.

I can add a new option in catalyst to make this possible but I will need some help to do it properly. I never programed in python and my knowledge in bash is limited.

Cédric




Using qemu is not really crosscompiling, IMHO...although i agree its easier.

Cédric Caron 08-05-2012 06:35 PM

cross compilling for arm cpu
 
> Using qemu is not really crosscompiling, IMHO...although i agree its easier.

I use qemu for python and shell scripts but c and c++ are really cross compiled using distcc to call x86 cross compiler.

It is probably possible to temporary add x86 binaries to replace some of the tools user but this will require more work.

And I plan to test distcc pump mode to do more native processing.

With this solution I am already compiling arm code faster and with more memory and storage available than on my Raspberry Pi

Cédric Caron 08-17-2012 11:58 AM

cross compilling for arm cpu
 
I created a bug in bugzilla with my patch.

https://bugs.gentoo.org/show_bug.cgi?id=431214

My version now includes a modified qemu-binfmt wrapper to run native version of selected tools

The only missing part to use a real cross compiler is a static version of gcc and any other tool you want to run natively.

Cédric
-----Original Message-----
From: Peter Stuge [mailto:peter@stuge.se]
Sent: samedi, 4. août 2012 10:11
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] cross compilling for arm cpu

C�dric Caron wrote:
> I used catalyst to cross compile a stage4 for my Raspberry Pi but
> this seems to require some manual step to work.

So what was your solution?


> Is anybody currently working on adding arm cross compiling support
> to catalyst.

I don't think actively no.


//Peter


All times are GMT. The time now is 12:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.