Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross-compiler for ARM/Raspberry Pi and libc6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
MoRPh3uSz
n00b
n00b


Joined: 12 Aug 2003
Posts: 69

PostPosted: Sat Mar 16, 2013 3:26 am    Post subject: Cross-compiler for ARM/Raspberry Pi and libc6 Reply with quote

Hi,
I'm trying to install gentoo on my raspberry pi, I managed to have it working using the instructions here http://wiki.gentoo.org/wiki/Raspberry_Pi

I now want to set up a cross compiler on my pc so that updating the raspberry pi it won't take too much time, at the moment I take the SD off the raspberry pi, mount it on my pc on /mnt/raspi and from there the cross compiler manages everything.
Unfortunately that it is not always the case as it is very common for packages to fail for missing dependencies (tipically zlib and ncurses) or like for dev-libs/gmp the linker doesn't like the libc.so.6

To set up the cross compiler I've followed instructions http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1&chap=3.
At the moment I'm launching emerge like that

Code:
mount /dev/sdc2 /mnt/raspi
mount /dev/sdc1 /mnt/raspi/boot

export ROOT="/mnt/raspi"
export SYSROOT=$ROOT

armv6j-hardfloat-linux-gnueabi-emerge -1av gmp


but it always fails returning the following error

Code:
/lib/libc.so.6: file not recognized: File format not recognized


Like if it is still going to the libc.so.6 file of the host pc.

Any idea? Am I missing anything?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54584
Location: 56N 3W

PostPosted: Sat Mar 16, 2013 9:26 am    Post subject: Reply with quote

MoRPh3uSz,

You have done the hard bit of setting up cross distcc as you have a cross compiler running.
Addining distcc to the mix is easy after that.

Make sure that the Pi and the helpers have the same version of the arm gcc.
Install distcc on the Pi and the helpers

Configure and run distccd on the helpers, so they are listening for build jobs.
Add distcc to FEATURES on the Pi.
Increase the -jX in MAKEOPS on the Pi

Run
Code:
pump emerge <package>
on the Pi. Most of the work will be done by the helpers.

NFS or a USB hard drive helps the need for speed on the Pi. /boot must be on the SD card but other filesystems can be moved.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum