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 07-26-2012, 05:09 PM
Peter Humphrey
 
Default Python TK

On Thursday 26 July 2012 17:36:37 Michael Mol wrote:
> On Thu, Jul 26, 2012 at 12:25 PM, Silvio Siefke <siefke_listen@web.de>
wrote:
> > On Thu, 26 Jul 2012 14:04:37 +0100
> >
> > Neil Bothwick <neil@digimed.co.uk> wrote:
> >> You could build packages in a chroot on a faster machine, that's
> >> what I do to run Gentoo on lower-popwered devices.
> >
> > Really that goes? With diffrent CPUs, Graphics and so? Because in
> > Desktop is Core 2 Duo with ATI Graphic and the network cards
> > others. On Netbook run Atom, Intel Graphic and Atheros Network.
>
> Sure. Just keep your USE flags straight. Graphics boards shouldn't
> make any difference at all in a cross-compiling scenario. As for
> CPU...programs compiled to run on an Atom proc should have no problem
> running on a Core 2 Duo.

Just to expand that, I followed Neil's advice when setting my boxes up.
I have an atom box as LAN server and an i5 workstation. I have a script
which I run on the workstation to mount all the necessary directories on
the chroot, including nfs-mounting the atom's /usr/portage/packages dir.
Then I chroot into the 32-bit system as described in the installation
handbook, env-update && . /etc/profile and away I go.

Then, on the atom, I emerge -kuaDvN world to install from the packages
I've just built.

The only thing to be careful of is keeping the atom box and the chroot
identical. /var/lib/portage/world and /etc/portage/ must be identical.
Also /usr/src/linux/.config and /boot/ .

Let me know if you'd like the mounting script.

--
Rgds
Peter
 
Old 07-26-2012, 07:21 PM
Silvio Siefke
 
Default Python TK

On Thu, 26 Jul 2012 18:09:26 +0100
Peter Humphrey <peter@humphrey.ukfsn.org> wrote:

> Let me know if you'd like the mounting script.

The way sounds intresting. The Script were nice, and if u have so a howto
can send me the link.


Thanks
Silvio
 
Old 07-26-2012, 07:23 PM
Silvio Siefke
 
Default Python TK

On Thu, 26 Jul 2012 12:36:37 -0400
Michael Mol <mikemol@gmail.com> wrote:

> Just don't use "-march=native" when cross-compiling.

Now i use native. Is there a problem, i know from FreeBSD,
there on ML have say me i should use.

Regards
Silvio
 
Old 07-26-2012, 07:33 PM
Neil Bothwick
 
Default Python TK

On Thu, 26 Jul 2012 18:09:26 +0100, Peter Humphrey wrote:

> Just to expand that, I followed Neil's advice when setting my boxes up.
> I have an atom box as LAN server and an i5 workstation. I have a script
> which I run on the workstation to mount all the necessary directories
> on the chroot, including nfs-mounting the atom's /usr/portage/packages
> dir. Then I chroot into the 32-bit system as described in the
> installation handbook, env-update && . /etc/profile and away I go.
>
> Then, on the atom, I emerge -kuaDvN world to install from the packages
> I've just built.
>
> The only thing to be careful of is keeping the atom box and the chroot
> identical. /var/lib/portage/world and /etc/portage/ must be identical.

I use a script that rsyncs these, sets up the chroot mounts and then
chroots. The only part it doesn't take care of is keeping the relevant
parts of make.conf in sync (because some parts of the file must be
different).

> Also /usr/src/linux/.config and /boot/ .

/boot doesn't need to be synced, /usr/src/linux only needs to be synced if
you are building kernel modules, but I build those natively (I also
compile kernels natively).

I really should get around to documenting this on the wiki sometimw.


--
Neil Bothwick

Distrust any enterprise that requires new clothes. - Henry David Thoreau
(1817-1862)
 
Old 07-26-2012, 08:11 PM
"Mike Edenfield"
 
Default Python TK

> From: Silvio Siefke [mailto:siefke_listen@web.de]

>> On Thu, 26 Jul 2012 12:36:37 -0400
>> Michael Mol <mikemol@gmail.com> wrote:
>>
>> > Just don't use "-march=native" when cross-compiling.

> Now i use native. Is there a problem, i know from FreeBSD, there on ML
have
> say me i should use.

Using "-march=native" if you are only building for your local machine is
fine. If you plan to use the setup proposed by Neil, and build your packages
on a faster machine, *then* you have to be careful not to use
"-march=native" because the compiled programs will be built for the faster
"native" CPU, and may not run on the slower architecture.

--Mike
 
Old 07-26-2012, 11:27 PM
Peter Humphrey
 
Default Python TK

On Thursday 26 July 2012 20:21:16 Silvio Siefke wrote:

> The way sounds intresting. The Script were nice, and if u have so a
> howto can send me the link.

/etc/init.d/atom attached. It ought also to include a command to extract
the useful bits of /etc/mtab and copy those to the chroot; otherwise
eclean complains that it can't read the table of mounts. There used to
be a suitable command somewhere in the installation docs but I can't find
it now. It used grep to omit bits that didn't help.

Mind you, if you can persuade Neil to document his modus operandi that
will be a good deal better than my fumbling efforts.

--
Rgds
Peter
#!/sbin/runscript

depend() {
need localmount
need bootmisc
}

start() {
ebegin "Mounting 32-bit chroot dirs"
mount -o bind /dev /mnt/atom/dev >/dev/null
mount -o bind /dev/pts /mnt/atom/dev/pts >/dev/null
mount -o bind /dev/shm /mnt/atom/dev/shm >/dev/null
mount -t proc /proc /mnt/atom/proc >/dev/null
mount -o bind /sys /mnt/atom/sys >/dev/null
mount -o bind /tmp /mnt/atom/tmp >/dev/null
mount -t nfs -o vers=3 192.168.2.2:/usr/portage/packages /mnt/atom/usr/portage/packages
eend $? "An error occurred while attempting to mount 32-bit chroot directories"
ebegin "Copying 32-bit chroot files"
cp -pf /etc/resolv.conf /mnt/atom/etc/ >/dev/null
cp -pf /etc/passwd /mnt/atom/etc/ >/dev/null
cp -pf /etc/shadow /mnt/atom/etc/ >/dev/null
cp -pf /etc/group /mnt/atom/etc/ >/dev/null
cp -pf /etc/hosts /mnt/atom/etc/ > /dev/null
cp -Ppf /etc/localtime /mnt/atom/etc/ >/dev/null
eend $? "An error occurred while attempting to copy 32-bit chroot files."
}

stop() {
ebegin "Unmounting 32-bit chroot dirs"
umount -f /mnt/atom/dev/pts >/dev/null
umount -f /mnt/atom/dev/shm >/dev/null
umount -f /mnt/atom/dev >/dev/null
umount -f /mnt/atom/proc >/dev/null
umount -f /mnt/atom/sys >/dev/null
umount -f /mnt/atom/tmp >/dev/null
umount -f /mnt/atom/usr/portage/packages >/dev/null
eend $? "An error occurred while attempting to unmount 32-bit chroot directories"
}
 
Old 07-28-2012, 12:04 AM
Silvio Siefke
 
Default Python TK

Hello,


On Fri, 27 Jul 2012 00:27:59 +0100
Peter Humphrey <peter@humphrey.ukfsn.org> wrote:

> /etc/init.d/atom attached. It ought also to include a command to extract
> the useful bits of /etc/mtab and copy those to the chroot; otherwise
> eclean complains that it can't read the table of mounts. There used to
> be a suitable command somewhere in the installation docs but I can't find
> it now. It used grep to omit bits that didn't help.
>
> Mind you, if you can persuade Neil to document his modus operandi that
> will be a good deal better than my fumbling efforts.

thank you, tomorrow i have new netbook so i will try it.


Regards
Silvio
 

Thread Tools




All times are GMT. The time now is 01:35 AM.

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