Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sharing "compiling power" between machines ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Mon Jan 21, 2013 11:51 pm    Post subject: Sharing "compiling power" between machines ? Reply with quote

Hi.

I have a Raspberry Pi and I want to use Gentoo on it. I see two options and both seem impractical:

- compiling packages on the ARM (takes time)
- cross compiling on desktop Gentoo (annoying upload every time emerge something)

So I was thinking about two solutions:

- share the processing resources of my desktop over the network so the Pi can use it for compilation
- synching (in background, fast, automatic) between the cross-compiled binaries on the desktop and the Pi

Any other solutions, ideas ?
If any of these are good and easy to implement, could you give me any hings on where to start ?

Or maybe a binary distro for the ARMv6 ? Arch ? (please not Debian)




PS if the forum section is inappropriate, please move the topic
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Jan 22, 2013 12:21 am    Post subject: Reply with quote

I would do something like this:

script on Pi that calls $DESKTOP to build package using cross compile. Script handles all the details via ssh using public key authentication, or something. Once emerge completes, the binary is stored to a shared partition (samba, nfs, or somthing) and same script then installs the package on $PI. That way you use Gentoo, but everything is abstracted.

I wouldn't say Arch is not particularly reliable. I just had an update kill my shadow files. Honestly, the problem was NOT between the keyboard and the chair with that one.

Some script hints to get you going. I would call it compile.sh, just because.

Code:
#!/bin/bash
#log into compiling computer

echo "Starting login"
ssh <non-root user>@<some static ip>

echo "starting build"
# build package. Assume it is called 'xmerge'
sudo xmerge $1

# logout

echo "Build finished"
exit

echo "installing $1"
#install binary
sudo emerge -vg $1



And there you go! A simple emerge with only 1 command and also only 1 or 2 entries of your password depending on how you configure ssh.

For updates, you can do something similar, but first you need to process the output of emerge -quND world on your deivice (replace [ebuild ....] with =)
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Jan 22, 2013 12:28 am    Post subject: Reply with quote

Maybe I'm missing something, but why can't you use portage buildpkg feature?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Tue Jan 22, 2013 1:40 am    Post subject: Reply with quote

Jaglover wrote:
Maybe I'm missing something, but why can't you use portage buildpkg feature?


Maybe because I've never used it and I don't know what it is :) I'll look into it. Thanks :)



:arrow: The Doctor
Thanks :) It's a bit complex, but I'll consider it :)
btw... Does Tardis run on Gentoo ? xD
Back to top
View user's profile Send private message
NotQuiteSane
Guru
Guru


Joined: 30 Jan 2005
Posts: 488
Location: Klamath Falls, Jefferson, USA, North America, Midgarth

PostPosted: Tue Jan 22, 2013 7:48 am    Post subject: Re: Sharing "compiling power" between machines ? Reply with quote

Gabriel_Blake wrote:
- share the processing resources of my desktop over the network so the Pi can use it for compilation
- synching (in background, fast, automatic) between the cross-compiled binaries on the desktop and the Pi


You want this and this.

NQS
_________________
These opinions are mine, mine I say! Piss off and get your own.

As I see it -- An irregular blog, Improved with new location

To delete French language packs from system use 'sudo rm -fr /'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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