Disclaimer : This handbook has been replaced by a newer version and is not maintained anymore.
You first need to select your timezone so that your system knows where it is located. Look for your timezone in /usr/share/zoneinfo, then make a symlink to /etc/localtime using ln:
Code Listing 1.1: Setting the timezone information
# ls /usr/share/zoneinfo (Suppose you want to use GMT) # ln -sf /usr/share/zoneinfo/GMT /etc/localtime
7.b. Installing the Sources
Choosing a Kernel
The core around which all distributions are built is the Linux kernel. It is the layer between the user programs and your system hardware. Gentoo provides its users several possible kernel sources. A full listing with description is available at the Gentoo Kernel Guide.
MIPS-based systems can choose from mips-sources (the default kernel source for the MIPS architecture) and mips-prepatch-sources (prerelease kernel tree).
Choose your kernel source and install it using emerge. Of course substitute with your choice of sources, this is merely an example:
Code Listing 2.1: Installing a kernel source
# emerge mips-sources
When you take a look in /usr/src you should see a symlink called linux pointing to your kernel source:
Code Listing 2.2: Viewing the kernel source symlink
# ls -l /usr/src/linux lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.4.24
If this isn't the case (i.e. the symlink points to a different kernel source) change the symlink before you continue:
Code Listing 2.3: Changing the kernel source symlink
# rm /usr/src/linux # cd /usr/src # ln -s linux-2.4.24 linux
Now it is time to configure and compile your kernel source.
7.c. Manual Configuration
Manually configuring a kernel is often seen as the most difficult procedure a Linux user ever has to perform. Nothing is less true -- after configuring a couple of kernels you don't even remember that it was difficult ;)
However, one thing is true: you must know your system when you start configuring a kernel manually. Most information can be gathered by viewing the contents of /proc/pci (or by using lspci if available). You can also run lsmod to see what kernel modules the LiveCD uses (it might provide you with a nice hint on what to enable).
Now go to your kernel source directory and execute make menuconfig. This will fire up an ncurses-based configuration menu.
Code Listing 3.1: Invoking menuconfig
# cd /usr/src/linux # make menuconfig
You will be greeted with several configuration sections. We'll first list some options you must activate (otherwise Gentoo will not function, or not function properly without additional tweaks).
Activating Required Options
First of all, activate the use of development and experimental code/drivers. You need this, otherwise some very important code/drivers won't show up:
Code Listing 3.2: Selecting experimental code/drivers
Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers
Now go to File Systems and select support for the filesystems you use. Don't compile them as modules, otherwise your Gentoo system will not be able to mount your partitions. Also select Virtual memory, /proc file system, /dev file system + Automatically mount at boot:
Code Listing 3.3: Selecting necessary file systems
(With a 2.4.x kernel) File systems ---> [*] Virtual memory file system support (former shm fs) [*] /proc file system support [*] /dev file system support (EXPERIMENTAL) [*] Automatically mount at boot [ ] /dev/pts file system for Unix98 PTYs (With a 2.6.x kernel) File systems ---> Pseudo Filesystems ---> [*] /proc file system support [*] /dev file system support (OBSOLETE) [*] Automatically mount at boot [*] Virtual memory file system support (former shm fs) (Select one or more of the following options as needed by your system) <*> Reiserfs support <*> Ext3 journalling file system support <*> JFS filesystem support <*> Second extended fs support <*> XFS filesystem support
If you are using PPPoE to connect to the Internet or you are using a dial-up modem, you will need the following options in the kernel:
Code Listing 3.4: Selecting PPPoE necessary drivers
(With a 2.4.x kernel) Network device support ---> <*> PPP (point-to-point protocol) support <*> PPP support for async serial ports <*> PPP support for sync tty ports (With a 2.6.x kernel) Device Drivers ---> Networking support ---> <*> PPP (point-to-point protocol) support <*> PPP support for async serial ports <*> PPP support for sync tty ports
The two compression options won't harm but are not definitely needed, neither does the PPP over Ethernet option, that might only be used by rp-pppoe when configured to do kernel mode PPPoE.
If you require it, don't forget to include support in the kernel for your ethernet card.
If you are using an Indy/Indigo2 based system, you need to activate support for it.
Code Listing 3.5: Activating SGI IP22
Machine selection ---> [*] Support for SGI IP22 (Indy/Indigo2)
If you want to run Irix binaries, include the following option:
Code Listing 3.6: Including IRIX Binary support
General setup ---> [*] Include IRIX binary compatibility
If you have ISA/EISA cards in your SGI Indigo2, enable support for it.
Code Listing 3.7: Enabling ISA/EISA support for SGI Indigo2
General setup ---> [*] Indigo-2 (IP22) EISA bus support [*] ISA bus support
If you have a SGI parallel port, you can enable support for it. If you have an ISA parallel port you should select "PC-style hardware" instead.
Code Listing 3.8: Enabling SGI Parallel Port Support
Parallel port support ---> <*> Parallel port support <*> SGI Indy/Indigo2 hardware (EXPERIMENTAL) (NEW) <*> IEEE 1284 transfer modes (NEW)
If you want to use the Indigo2 ISA slots, enable the plug and play support.
Code Listing 3.9: Enabling PnP support for ISA
Plug and Play configuration ---> <*> Plug and Play support <*> ISA Plug and Play support
Don't forget to enable SCSI support, and use the SGI WD93C93 Driver:
Code Listing 3.10: Enabling WD93C93 Driver Support
SCSI low-level drivers ---> <*> SGI WD93C93 SCSI Driver
For network cards you probably need support for the SGI Seeq ethernet controller:
Code Listing 3.11: Enabling SGI Seeq Support
Network device support ---> Ethernet (10 or 100Mbit) ---> [*] Ethernet (10 or 100Mbit) [*] SGI Seeq ethernet controller support
Don't forget to enable serial console support and enable support for the SGI Zilog85C30:
Code Listing 3.12: Enable SGI Zilog85C30 Support
Character devices ---> [*] Non-standard serial port support [*] SGI Zilog85C30 serial support
Also don't forget to enable the Indy/I2 Watchdog support as well as the SGI DS1286 RTC support:
Code Listing 3.13: Enable Watchdog and RTC Support
Character Devices ---> [*] SGI DS1286 RTC support Watchdog Cards ---> [*] Watchdog Timer Support <*> Indy/I2 Hardware Watchdog
You should also enable support for SGI partitions :)
Code Listing 3.14: Enabling Support for SGI Partitions
File Systems ---> Partition Types ---> [*] Advanced partition selection [*] SGI partition support
If you have an SGI Newport (XL Gfx) Card and want to use it, then you'll want to enable support for it:
Code Listing 3.15: Enabling Support for the SGI Newport Card
Console drivers ---> <*> SGI Newport Console support (NEW)
If you want sound support on your Indy/Indigo2, enable support for it:
Code Listing 3.16: Enabling Support for the SGI HAL2
Sound ---> <*> Sound card support <*> SGI HAL2 sound (EXPERIMENTAL)
When you're done configuring your kernel, continue with Compiling and Installing.
Compiling and Installing
Now that your kernel is configured, it is time to compile and install it. Exit the configuration and run make dep && make vmlinux modules modules_install:
Code Listing 3.17: Compiling the kernel
(For 2.4 kernel) # make dep && make vmlinux modules modules_install (For 2.6 kernel) # make && make modules_install
When the kernel has finished compiling, copy the kernel image to /boot.
Code Listing 3.18: Installing the kernel
# cp vmlinux /boot/kernel-2.4.24 # cp System.map /boot/System.map-2.4.24
It is also wise to copy over your kernel configuration file to /boot, just in case :)
Code Listing 3.19: Backing up your kernel configuration
# cp .config /boot/config-2.4.24
If your system doesn't boot ELF kernels, compile the kernel using make vmlinux.ecoff instead of make vmlinux. The kernel image will be saved as arch/mips/boot/vmlinux.ecoff instead of vmlinux.
7.d. Installing Separate Kernel Modules
Configuring the Modules
You should list the modules you want automatically loaded in /etc/modules.autoload.d/kernel-2.4 (or kernel-2.6). You can add extra options to the modules too if you want.
To view all available modules, run the following find command. Don't forget to substitute "<kernel version>" with the version of the kernel you just compiled:
Code Listing 4.1: Viewing all available modules
# find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'
For instance, to automatically load the 3c59x.o module, edit the kernel-2.4 or kernel-2.6 file and enter the module name in it.
Code Listing 4.2: Editing /etc/modules.autoload.d/kernel-2.4
(Example for 2.4 kernels) # nano -w /etc/modules.autoload.d/kernel-2.4
Code Listing 4.3: /etc/modules.autoload.d/kernel-2.4 or kernel-2.6
Now run modules-update to commit your changes to the /etc/modules.conf file:
Code Listing 4.4: Running modules-update
Continue the installation with Configuring your System.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.