On Tue, Feb 21, 2017 at 12:22:51AM +0000, Neil Bothwick wrote

> If the chroot is identical to your netbooks's install in terms of
> *FLAGS, USE, @world etc, then yes. I used to do it this way when I had an
> Atom netbook. I even build for a low memory 486 system in the same way.

  Unfortunately, the cpus are different enough that CFLAGS, CXXFLAGS,
and CPU_FLAGS_X86 are different.  See the web page...
https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options

  I actually use "-march=native" in make.conf, but this translates as...

* The netbook cpu equals "-march=bonnell" (first-generation Atom).

* My current desktop equals "-march=ivybridge"

* My "hot backup" machine equals "-march=silvermont"

  The natively-compiled code on the netbook will not run on my desktop
because the Ivybridge cpu doesn't support MOVBE instructions.  The
netbook has 2 gigs of ram.  I estimate 12 hours if I

* changed CFLAGS to "-march=core2" and adjusted CPU_FLAGS_X86

* and ran "emerge -e @world" on the netbook.

  That would produce "lowest common denominator" code that would run on
both the netbook and my desktop.  Then I could rsync the contents of the
netbook into what would become a chroot directory on the desktop.  After
that, I'd have to change to "-march=native", adjust CPU_FLAGS_X86, and
then "emerge -e @world" on both the netbook and the desktop's chroot.

  A better option would be to

* rsync the contents of the netbook to the Silvermont.  It's a newer
  Atom-family cpu, and can handle MOVBE instructions.

* change CFLAGS to "-march=silvermont -mno-movbe" and "emerge -e @world"
  on the Silvermont.  It has a newer, more powerful cpu than netbook,
  and also 8 gigs of ram, versus the netbook's 2 gigs.  A full rebuild
  won't take anywhere near as long.

* rsync the contents of the Silvermont's chroot directory to the
  Ivybridge desktop.

> Oh, and you don't need a package server, just export PKGDIR via NFS
> and mount it on the netbook.

  I see nfs as being more complex with kernel settings required for
client and server, not to mention config files all over the place.
Gentoo has python as part of the system.  To fire up a very simple
binary package webserver from a commandline (xterm/whatever)...

In python 2.x
cd /usr/portage/packages
python -m SimpleHTTPServer nnnn

In python 3.x
cd /usr/portage/packages
python3 -m http.server nnnn

...where "nnnn" is the desired port number to listen on.  In both cases 
the default port is 8000 if not specified.  Note that only root can open
privileged ports in the range 0..1023.

-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to