| 1 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
| 4 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
|
| 6 |
|
| 7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-mips-system.xml,v 1.3 2007/05/01 06:56:14 nightmorph Exp $ -->
|
| 8 |
|
| 9 |
<sections>
|
| 10 |
|
| 11 |
<version>8.0</version>
|
| 12 |
<date>2007-05-07</date>
|
| 13 |
|
| 14 |
<section>
|
| 15 |
<title>Chrooting</title>
|
| 16 |
<subsection>
|
| 17 |
<title>Copy DNS Info</title>
|
| 18 |
<body>
|
| 19 |
|
| 20 |
<p>
|
| 21 |
One thing still remains to be done before we enter the new environment and that
|
| 22 |
is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
|
| 23 |
to do this to ensure that networking still works even after entering the new
|
| 24 |
environment. <path>/etc/resolv.conf</path> contains the nameservers for your
|
| 25 |
network.
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<pre caption="Copy over DNS information">
|
| 29 |
<comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
|
| 30 |
# <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
|
| 31 |
</pre>
|
| 32 |
|
| 33 |
</body>
|
| 34 |
</subsection>
|
| 35 |
<subsection>
|
| 36 |
<title>Mounting the /proc and /dev Filesystems</title>
|
| 37 |
<body>
|
| 38 |
|
| 39 |
<p>
|
| 40 |
Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
|
| 41 |
allow the installation to use the kernel-provided information within the
|
| 42 |
chrooted environment, and then mount-bind the <path>/dev</path> filesystem.
|
| 43 |
</p>
|
| 44 |
|
| 45 |
<pre caption="Mounting /proc and /dev">
|
| 46 |
# <i>mount -t proc none /mnt/gentoo/proc</i>
|
| 47 |
# <i>mount -o bind /dev /mnt/gentoo/dev</i>
|
| 48 |
</pre>
|
| 49 |
|
| 50 |
</body>
|
| 51 |
</subsection>
|
| 52 |
<subsection>
|
| 53 |
<title>Entering the new Environment</title>
|
| 54 |
<body>
|
| 55 |
|
| 56 |
<p>
|
| 57 |
Now that all partitions are initialized and the base environment
|
| 58 |
installed, it is time to enter our new installation environment by
|
| 59 |
<e>chrooting</e> into it. This means that we change from the current
|
| 60 |
installation environment (Installation CD or other installation medium) to your
|
| 61 |
installation system (namely the initialized partitions).
|
| 62 |
</p>
|
| 63 |
|
| 64 |
<p>
|
| 65 |
This chrooting is done in three steps. First we will change the root
|
| 66 |
from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
|
| 67 |
(on your partitions) using <c>chroot</c>. Then we will create a new environment
|
| 68 |
using <c>env-update</c>, which essentially creates environment variables.
|
| 69 |
Finally, we load those variables into memory using <c>source</c>.
|
| 70 |
</p>
|
| 71 |
|
| 72 |
<pre caption = "Chrooting into the new environment">
|
| 73 |
# <i>chroot /mnt/gentoo /bin/bash</i>
|
| 74 |
# <i>env-update</i>
|
| 75 |
>> Regenerating /etc/ld.so.cache...
|
| 76 |
# <i>source /etc/profile</i>
|
| 77 |
# <i>export PS1="(chroot) $PS1"</i>
|
| 78 |
</pre>
|
| 79 |
|
| 80 |
<p>
|
| 81 |
Congratulations! You are now inside your own Gentoo Linux environment.
|
| 82 |
Of course it is far from finished, which is why the installation still
|
| 83 |
has some sections left :-)
|
| 84 |
</p>
|
| 85 |
|
| 86 |
</body>
|
| 87 |
</subsection>
|
| 88 |
</section>
|
| 89 |
|
| 90 |
<section>
|
| 91 |
<title>Configuring Portage</title>
|
| 92 |
<subsection>
|
| 93 |
<title>Updating the Portage tree</title>
|
| 94 |
<body>
|
| 95 |
|
| 96 |
<p>
|
| 97 |
You should now update your Portage tree to the latest version. <c>emerge
|
| 98 |
--sync</c> does this for you.
|
| 99 |
</p>
|
| 100 |
|
| 101 |
<pre caption="Updating the Portage tree">
|
| 102 |
# <i>emerge --sync</i>
|
| 103 |
<comment>(If you're using a slow terminal like some framebuffers or a serial
|
| 104 |
console, you can add the --quiet option to speed up this process:)</comment>
|
| 105 |
# <i>emerge --sync --quiet</i>
|
| 106 |
</pre>
|
| 107 |
|
| 108 |
<p>
|
| 109 |
If you are behind a firewall that blocks rsync traffic, you can use
|
| 110 |
<c>emerge-webrsync</c> which will download and install a portage snapshot for
|
| 111 |
you.
|
| 112 |
</p>
|
| 113 |
|
| 114 |
<p>
|
| 115 |
If you are warned that a new Portage version is available and that you should
|
| 116 |
update Portage, you should do it now using <c>emerge portage</c> command.
|
| 117 |
</p>
|
| 118 |
|
| 119 |
</body>
|
| 120 |
</subsection>
|
| 121 |
<subsection>
|
| 122 |
<title>Choosing the Right Profile</title>
|
| 123 |
<body>
|
| 124 |
|
| 125 |
<p>
|
| 126 |
First, a small definition is in place.
|
| 127 |
</p>
|
| 128 |
|
| 129 |
<p>
|
| 130 |
A profile is a building block for any Gentoo system. Not only does it specify
|
| 131 |
default values for CHOST, CFLAGS and other important variables, it also locks
|
| 132 |
the system to a certain range of package versions. This is all maintained by the
|
| 133 |
Gentoo developers.
|
| 134 |
</p>
|
| 135 |
|
| 136 |
<p>
|
| 137 |
Previously, such a profile was barely touched by the user. However, there may be
|
| 138 |
situations in which you may decide a profile change is necessary.
|
| 139 |
</p>
|
| 140 |
|
| 141 |
<p>
|
| 142 |
Since 2006.0, there has been a re-shuffle regarding the profiles for MIPS
|
| 143 |
systems. These profiles set various options including USE flags, which affect
|
| 144 |
what patchsets are enabled with various system-critical packages (notably,
|
| 145 |
<c>gcc</c> and <c>mips-sources</c>).
|
| 146 |
</p>
|
| 147 |
|
| 148 |
<p>
|
| 149 |
Thus, care needs to be taken to ensure the correct profile is selected for your
|
| 150 |
system type. As of Gentoo/MIPS 2007.0, the profiles are:
|
| 151 |
</p>
|
| 152 |
|
| 153 |
<table>
|
| 154 |
<tr>
|
| 155 |
<th>System</th>
|
| 156 |
<th>Profile</th>
|
| 157 |
<th>Userland</th>
|
| 158 |
<th>Status/Notes</th>
|
| 159 |
</tr>
|
| 160 |
<tr>
|
| 161 |
<ti>Cobalt Qube/RaQ</ti>
|
| 162 |
<ti>default-linux/mips/2007.0/cobalt/o32</ti>
|
| 163 |
<ti>32-bit Linuxthreads</ti>
|
| 164 |
<ti>Recommended</ti>
|
| 165 |
</tr>
|
| 166 |
<tr>
|
| 167 |
<ti>"</ti>
|
| 168 |
<ti>default-linux/mips/2007.0/cobalt/o32/nptl</ti>
|
| 169 |
<ti>32-bit NPTL</ti>
|
| 170 |
<ti>In Testing (1)</ti>
|
| 171 |
</tr>
|
| 172 |
<tr>
|
| 173 |
<th> </th>
|
| 174 |
<th> </th>
|
| 175 |
<th> </th>
|
| 176 |
<th> </th>
|
| 177 |
</tr>
|
| 178 |
<tr>
|
| 179 |
<ti>
|
| 180 |
Generic Big Endian<br />
|
| 181 |
<e>Including SGI Indy, Indigo2 (R4x00), Challenge S and O2</e>
|
| 182 |
</ti>
|
| 183 |
<ti>default-linux/mips/2007.0/generic-be/o32</ti>
|
| 184 |
<ti>32-bit Linuxthreads</ti>
|
| 185 |
<ti>Recommended</ti>
|
| 186 |
</tr>
|
| 187 |
<tr>
|
| 188 |
<ti>"</ti>
|
| 189 |
<ti>default-linux/mips/2007.0/generic-be/o32/nptl</ti>
|
| 190 |
<ti>32-bit NPTL</ti>
|
| 191 |
<ti>In Testing (1)</ti>
|
| 192 |
</tr>
|
| 193 |
<tr>
|
| 194 |
<ti>"</ti>
|
| 195 |
<ti>default-linux/mips/2007.0/generic-be/n32</ti>
|
| 196 |
<ti>N32 Linuxthreads</ti>
|
| 197 |
<ti>Highly Experimental (2)</ti>
|
| 198 |
</tr>
|
| 199 |
<tr>
|
| 200 |
<ti>"</ti>
|
| 201 |
<ti>default-linux/mips/2007.0/generic-be/n32/nptl</ti>
|
| 202 |
<ti>N32 NPTL</ti>
|
| 203 |
<ti>Highly Experimental (1) (2)</ti>
|
| 204 |
</tr>
|
| 205 |
<tr>
|
| 206 |
<ti>"</ti>
|
| 207 |
<ti>default-linux/mips/2007.0/generic-be/n64</ti>
|
| 208 |
<ti>N64 Linuxthreads</ti>
|
| 209 |
<ti>Unsupported (3)</ti>
|
| 210 |
</tr>
|
| 211 |
<tr>
|
| 212 |
<ti>"</ti>
|
| 213 |
<ti>default-linux/mips/2007.0/generic-be/n64/nptl</ti>
|
| 214 |
<ti>N64 NPTL</ti>
|
| 215 |
<ti>Unsupported (1) (3)</ti>
|
| 216 |
</tr>
|
| 217 |
<tr>
|
| 218 |
<th> </th>
|
| 219 |
<th> </th>
|
| 220 |
<th> </th>
|
| 221 |
<th> </th>
|
| 222 |
</tr>
|
| 223 |
<tr>
|
| 224 |
<ti>SGI Origin 200/2000</ti>
|
| 225 |
<ti>default-linux/mips/2007.0/ip27/o32</ti>
|
| 226 |
<ti>32-bit Linuxthreads</ti>
|
| 227 |
<ti>Recommended</ti>
|
| 228 |
</tr>
|
| 229 |
<tr>
|
| 230 |
<ti>"</ti>
|
| 231 |
<ti>default-linux/mips/2007.0/ip27/o32/nptl</ti>
|
| 232 |
<ti>32-bit NPTL</ti>
|
| 233 |
<ti>In Testing (1)</ti>
|
| 234 |
</tr>
|
| 235 |
<tr>
|
| 236 |
<ti>"</ti>
|
| 237 |
<ti>default-linux/mips/2007.0/ip27/n32</ti>
|
| 238 |
<ti>N32 Linuxthreads</ti>
|
| 239 |
<ti>Highly Experimental (2)</ti>
|
| 240 |
</tr>
|
| 241 |
<tr>
|
| 242 |
<ti>"</ti>
|
| 243 |
<ti>default-linux/mips/2007.0/ip27/n32/nptl</ti>
|
| 244 |
<ti>N32 NPTL</ti>
|
| 245 |
<ti>Highly Experimental (1) (2)</ti>
|
| 246 |
</tr>
|
| 247 |
|
| 248 |
<tr>
|
| 249 |
<th> </th>
|
| 250 |
<th> </th>
|
| 251 |
<th> </th>
|
| 252 |
<th> </th>
|
| 253 |
</tr>
|
| 254 |
<tr>
|
| 255 |
<ti>SGI Indigo2 Impact R10000</ti>
|
| 256 |
<ti>default-linux/mips/2007.0/ip28/o32</ti>
|
| 257 |
<ti>32-bit Linuxthreads</ti>
|
| 258 |
<ti>Recommended</ti>
|
| 259 |
</tr>
|
| 260 |
<tr>
|
| 261 |
<ti>"</ti>
|
| 262 |
<ti>default-linux/mips/2007.0/ip28/o32/nptl</ti>
|
| 263 |
<ti>32-bit NPTL</ti>
|
| 264 |
<ti>In Testing (1)</ti>
|
| 265 |
</tr>
|
| 266 |
<tr>
|
| 267 |
<ti>"</ti>
|
| 268 |
<ti>default-linux/mips/2007.0/ip28/n32</ti>
|
| 269 |
<ti>N32 Linuxthreads</ti>
|
| 270 |
<ti>Highly Experimental (2)</ti>
|
| 271 |
</tr>
|
| 272 |
<tr>
|
| 273 |
<ti>"</ti>
|
| 274 |
<ti>default-linux/mips/2007.0/ip28/n32/nptl</ti>
|
| 275 |
<ti>N32 NPTL</ti>
|
| 276 |
<ti>Highly Experimental (1) (2)</ti>
|
| 277 |
</tr>
|
| 278 |
<tr>
|
| 279 |
<th> </th>
|
| 280 |
<th> </th>
|
| 281 |
<th> </th>
|
| 282 |
<th> </th>
|
| 283 |
</tr>
|
| 284 |
<tr>
|
| 285 |
<ti>SGI Octane/Octane2</ti>
|
| 286 |
<ti>default-linux/mips/2007.0/ip30/o32</ti>
|
| 287 |
<ti>32-bit Linuxthreads</ti>
|
| 288 |
<ti>Recommended</ti>
|
| 289 |
</tr>
|
| 290 |
<tr>
|
| 291 |
<ti>"</ti>
|
| 292 |
<ti>default-linux/mips/2007.0/ip30/o32/nptl</ti>
|
| 293 |
<ti>32-bit NPTL</ti>
|
| 294 |
<ti>In Testing (1)</ti>
|
| 295 |
</tr>
|
| 296 |
<tr>
|
| 297 |
<ti>"</ti>
|
| 298 |
<ti>default-linux/mips/2007.0/ip30/n32</ti>
|
| 299 |
<ti>N32 Linuxthreads</ti>
|
| 300 |
<ti>Highly Experimental (2)</ti>
|
| 301 |
</tr>
|
| 302 |
<tr>
|
| 303 |
<ti>"</ti>
|
| 304 |
<ti>default-linux/mips/2007.0/ip30/n32/nptl</ti>
|
| 305 |
<ti>N32 NPTL</ti>
|
| 306 |
<ti>Highly Experimental (1) (2)</ti>
|
| 307 |
</tr>
|
| 308 |
</table>
|
| 309 |
|
| 310 |
<impo>
|
| 311 |
(1) NPTL is in-testing on MIPS at this stage, requiring <c>gcc-4.1</c> and
|
| 312 |
<c>glibc-2.4</c>. It is believed that NPTL should be safe enough now for people
|
| 313 |
to use, and is planned to be the default in future releases. Brave users are
|
| 314 |
welcomed to try these profiles out and report back.
|
| 315 |
</impo>
|
| 316 |
|
| 317 |
<warn>
|
| 318 |
(2) n32 Userland is highly experimental, a lot of software has problems with
|
| 319 |
this ABI, and thus it is practically guaranteed that you will run into stability
|
| 320 |
problems at some point. Work is being done to improve the situation, however,
|
| 321 |
no support is offered if you use this profile, unless you're willing to help
|
| 322 |
fix problems by submitting patches.
|
| 323 |
</warn>
|
| 324 |
|
| 325 |
<warn>
|
| 326 |
(3) n64 Userland at present is completely unsupported on all systems. At this
|
| 327 |
time there are no stages available that support n64, and this isn't likely to
|
| 328 |
change in the near future.
|
| 329 |
</warn>
|
| 330 |
|
| 331 |
<p>
|
| 332 |
You can see what profile you are currently using with the following command:
|
| 333 |
</p>
|
| 334 |
|
| 335 |
<pre caption="Verifying system profile">
|
| 336 |
# <i>ls -FGg /etc/make.profile</i>
|
| 337 |
lrwxrwxrwx 1 48 Apr 8 18:51 /etc/make.profile -> ../usr/portage/profiles/default-linux/mips/2007.0/generic-be/o32/
|
| 338 |
</pre>
|
| 339 |
|
| 340 |
<p>
|
| 341 |
Having looked through the profiles above, and decided which one is the most
|
| 342 |
appropriate, you need to adjust your <path>make.profile</path> symlink to
|
| 343 |
reflect this. By default, the profiles are in
|
| 344 |
<path>/usr/portage/profiles</path>, so if you've moved your portage tree
|
| 345 |
elsewhere (not recommended), adjust the commands below accordingly.
|
| 346 |
</p>
|
| 347 |
|
| 348 |
<pre caption="Setting the profile">
|
| 349 |
<comment>(Delete the old profile symlink)</comment>
|
| 350 |
# <i>rm -f /etc/make.profile</i>
|
| 351 |
|
| 352 |
<comment>(Create a new symlink pointing to your chosen profile )
|
| 353 |
(For example, this is what one would use on an Indy or O2.)</comment>
|
| 354 |
# <i>ln -s /usr/portage/profiles/default-linux/mips/2007.0/generic-be/o32</i>
|
| 355 |
</pre>
|
| 356 |
|
| 357 |
<note>
|
| 358 |
A tip for those not familiar with the Bourne Again Shell... If you partially
|
| 359 |
type a filename or command, then hit the TAB key, it will automatically fill out
|
| 360 |
the command/filename until the last common character. E.g. typing
|
| 361 |
<c>/usr/portage/profiles/def<TAB></c>, <c>bash</c> will automatically put
|
| 362 |
down <c>default-</c>. Pressing TAB a couple of more times will reveal the
|
| 363 |
possibilities, <c>default-linux</c>, <c>default-darwin</c> and
|
| 364 |
<c>default-bsd</c>. Give it a try, you'll find it very handy for navigating the
|
| 365 |
command line.
|
| 366 |
</note>
|
| 367 |
|
| 368 |
</body>
|
| 369 |
</subsection>
|
| 370 |
<subsection id="configure_USE">
|
| 371 |
<title>Configuring the USE variable</title>
|
| 372 |
<body>
|
| 373 |
|
| 374 |
<p>
|
| 375 |
<c>USE</c> is one of the most powerful variables Gentoo provides to its users.
|
| 376 |
Several programs can be compiled with or without optional support for certain
|
| 377 |
items. For instance, some programs can be compiled with gtk-support, or with
|
| 378 |
qt-support. Others can be compiled with or without SSL support. Some programs
|
| 379 |
can even be compiled with framebuffer support (svgalib) instead of X11 support
|
| 380 |
(X-server).
|
| 381 |
</p>
|
| 382 |
|
| 383 |
<p>
|
| 384 |
Most distributions compile their packages with support for as much as possible,
|
| 385 |
increasing the size of the programs and startup time, not to mention an enormous
|
| 386 |
amount of dependencies. With Gentoo you can define what options a package
|
| 387 |
should be compiled with. This is where <c>USE</c> comes into play.
|
| 388 |
</p>
|
| 389 |
|
| 390 |
<p>
|
| 391 |
In the <c>USE</c> variable you define keywords which are mapped onto
|
| 392 |
compile-options. For instance, <e>ssl</e> will compile ssl-support in the
|
| 393 |
programs that support it. <e>-X</e> will remove X-server support (note the
|
| 394 |
minus sign in front). <e>gnome gtk -kde -qt3 -qt4</e> will compile your
|
| 395 |
programs with gnome (and gtk) support, and not with kde (and qt) support,
|
| 396 |
making your system fully tweaked for GNOME.
|
| 397 |
</p>
|
| 398 |
|
| 399 |
<p>
|
| 400 |
The default <c>USE</c> settings are placed in the <path>make.defaults</path>
|
| 401 |
files of your profile. You will find <path>make.defaults</path> files in the
|
| 402 |
directory which <path>/etc/make.profile</path> points to and all parent
|
| 403 |
directories as well. The default <c>USE</c> setting is the sum of all <c>USE</c>
|
| 404 |
settings in all <path>make.defaults</path> files. What you place in
|
| 405 |
<path>/etc/make.conf</path> is calculated against these defaults settings. If
|
| 406 |
you add something to the <c>USE</c> setting, it is added to the default list. If
|
| 407 |
you remove something from the <c>USE</c> setting (by placing a minus sign in
|
| 408 |
front of it) it is removed from the default list (if it was in the default list
|
| 409 |
at all). <e>Never</e> alter anything inside the <path>/etc/make.profile</path>
|
| 410 |
directory; it gets overwritten when you update Portage!
|
| 411 |
</p>
|
| 412 |
|
| 413 |
<p>
|
| 414 |
A full description on <c>USE</c> can be found in the second part of the Gentoo
|
| 415 |
Handbook, <uri link="?part=2&chap=2">USE flags</uri>. A full description on
|
| 416 |
the available USE flags can be found on your system in
|
| 417 |
<path>/usr/portage/profiles/use.desc</path>.
|
| 418 |
</p>
|
| 419 |
|
| 420 |
<pre caption="Viewing available USE flags">
|
| 421 |
# <i>less /usr/portage/profiles/use.desc</i>
|
| 422 |
<comment>(You can scroll using your arrow keys, exit by pressing 'q')</comment>
|
| 423 |
</pre>
|
| 424 |
|
| 425 |
<p>
|
| 426 |
As an example we show a <c>USE</c> setting for a KDE-based system with DVD, ALSA
|
| 427 |
and CD Recording support:
|
| 428 |
</p>
|
| 429 |
|
| 430 |
<pre caption="Opening /etc/make.conf">
|
| 431 |
# <i>nano -w /etc/make.conf</i>
|
| 432 |
</pre>
|
| 433 |
|
| 434 |
<pre caption="USE setting">
|
| 435 |
USE="-gtk -gnome qt3 qt4 kde dvd alsa cdr"
|
| 436 |
</pre>
|
| 437 |
|
| 438 |
</body>
|
| 439 |
</subsection>
|
| 440 |
<subsection>
|
| 441 |
<title>Optional: GLIBC Locales</title>
|
| 442 |
<body>
|
| 443 |
|
| 444 |
<p>
|
| 445 |
You will probably only use one or maybe two locales on your system. You can
|
| 446 |
specify locales you will need in <path>/etc/locale.gen</path>.
|
| 447 |
</p>
|
| 448 |
|
| 449 |
<pre caption="Opening /etc/locale.gen">
|
| 450 |
# <i>nano -w /etc/locale.gen</i>
|
| 451 |
</pre>
|
| 452 |
|
| 453 |
<p>
|
| 454 |
The following locales are an example to get both English (United States) and
|
| 455 |
German (Germany) with the accompanying character formats (like UTF-8).
|
| 456 |
</p>
|
| 457 |
|
| 458 |
<pre caption="Specify your locales">
|
| 459 |
en_US ISO-8859-1
|
| 460 |
en_US.UTF-8 UTF-8
|
| 461 |
de_DE ISO-8859-1
|
| 462 |
de_DE@euro ISO-8859-15
|
| 463 |
</pre>
|
| 464 |
|
| 465 |
<p>
|
| 466 |
The next step is to run <c>locale-gen</c>. It will generate all the locales you
|
| 467 |
have specified in the <path>/etc/locale.gen</path> file.
|
| 468 |
</p>
|
| 469 |
|
| 470 |
<p>
|
| 471 |
Now continue with <uri link="?part=1&chap=7">Configuring the Kernel</uri>.
|
| 472 |
</p>
|
| 473 |
|
| 474 |
</body>
|
| 475 |
</subsection>
|
| 476 |
</section>
|
| 477 |
</sections>
|