1 |
On Tue, Feb 21, 2017 at 12:22:51AM +0000, Neil Bothwick wrote |
2 |
|
3 |
> If the chroot is identical to your netbooks's install in terms of |
4 |
> *FLAGS, USE, @world etc, then yes. I used to do it this way when I had an |
5 |
> Atom netbook. I even build for a low memory 486 system in the same way. |
6 |
|
7 |
Unfortunately, the cpus are different enough that CFLAGS, CXXFLAGS, |
8 |
and CPU_FLAGS_X86 are different. See the web page... |
9 |
https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options |
10 |
|
11 |
I actually use "-march=native" in make.conf, but this translates as... |
12 |
|
13 |
* The netbook cpu equals "-march=bonnell" (first-generation Atom). |
14 |
|
15 |
* My current desktop equals "-march=ivybridge" |
16 |
|
17 |
* My "hot backup" machine equals "-march=silvermont" |
18 |
|
19 |
The natively-compiled code on the netbook will not run on my desktop |
20 |
because the Ivybridge cpu doesn't support MOVBE instructions. The |
21 |
netbook has 2 gigs of ram. I estimate 12 hours if I |
22 |
|
23 |
* changed CFLAGS to "-march=core2" and adjusted CPU_FLAGS_X86 |
24 |
|
25 |
* and ran "emerge -e @world" on the netbook. |
26 |
|
27 |
That would produce "lowest common denominator" code that would run on |
28 |
both the netbook and my desktop. Then I could rsync the contents of the |
29 |
netbook into what would become a chroot directory on the desktop. After |
30 |
that, I'd have to change to "-march=native", adjust CPU_FLAGS_X86, and |
31 |
then "emerge -e @world" on both the netbook and the desktop's chroot. |
32 |
|
33 |
A better option would be to |
34 |
|
35 |
* rsync the contents of the netbook to the Silvermont. It's a newer |
36 |
Atom-family cpu, and can handle MOVBE instructions. |
37 |
|
38 |
* change CFLAGS to "-march=silvermont -mno-movbe" and "emerge -e @world" |
39 |
on the Silvermont. It has a newer, more powerful cpu than netbook, |
40 |
and also 8 gigs of ram, versus the netbook's 2 gigs. A full rebuild |
41 |
won't take anywhere near as long. |
42 |
|
43 |
* rsync the contents of the Silvermont's chroot directory to the |
44 |
Ivybridge desktop. |
45 |
|
46 |
> Oh, and you don't need a package server, just export PKGDIR via NFS |
47 |
> and mount it on the netbook. |
48 |
|
49 |
I see nfs as being more complex with kernel settings required for |
50 |
client and server, not to mention config files all over the place. |
51 |
Gentoo has python as part of the system. To fire up a very simple |
52 |
binary package webserver from a commandline (xterm/whatever)... |
53 |
|
54 |
In python 2.x |
55 |
cd /usr/portage/packages |
56 |
python -m SimpleHTTPServer nnnn |
57 |
|
58 |
In python 3.x |
59 |
cd /usr/portage/packages |
60 |
python3 -m http.server nnnn |
61 |
|
62 |
...where "nnnn" is the desired port number to listen on. In both cases |
63 |
the default port is 8000 if not specified. Note that only root can open |
64 |
privileged ports in the range 0..1023. |
65 |
|
66 |
-- |
67 |
Walter Dnes <waltdnes@××××××××.org> |
68 |
I don't run "desktop environments"; I run useful applications |