Handbook:PPC/Blocks/Kernel

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.


Architecture specific configuration

Important
Before starting to configure the Linux kernel, run make pmac32_defconfig to make sure a kernel is created that boots on most 32-bit PowerPC systems:
root #cd /usr/src/linux
root #make pmac32_defconfig
root #make menuconfig

Make sure to enable support for Amiga partitions if using a Pegasos system, or Macintosh partitions when using an Apple computer.

Users of NewWorld and OldWorld machines will want HFS support as well. OldWorld users require it for copying compiled kernels to the MacOS partition. NewWorld users require it for configuring the special Apple_Bootstrap partition:

KERNEL Activating HFS support
File Systems --->
  Miscellaneous filesystems --->
    <M> Apple Macintosh file system support
    <M> Apple Extended HFS file system support

Don't forget to include support in the kernel for the right Ethernet card! Most newer Apple computers use the SunGEM Ethernet driver. Older iMacs commonly use the BMAC driver.

KERNEL Selecting the network driver
Device Drivers --->
  Network device support --->
    Ethernet (10 or 100Mbit) --->
      [*] Ethernet (10 or 100Mbit)
      <*>   Generic Media Independent Interface device support
      <*>   MACE (Power Mac ethernet) support
      <*>   BMAC (G3 ethernet) support
      <*>   Sun GEM support

When booting from FireWire, enable the following options.

KERNEL Enable support for FireWire devices on boot
Device Drivers --->
  IEEE 1394 (FireWire) support --->
    <*> IEEE 1394 (FireWire) support
    <*>   OHCI-1394 support
    <*>   SBP-2 support (Harddisks etc.)

Do not turn off kernel framebuffer support as it is required for a successful boot. When using an NVIDIA based chipset, use the Open Firmware framebuffer. When using an ATI based chipset, select the framebuffer driver based upon the right chipset (Mach64, Rage128, or Radeon).

KERNEL Choosing a framebuffer driver
Device Drivers --->
  Graphics support --->
    <*> Support for frame buffer devices
    [*] Open Firmware frame buffer device support
    <*> ATI Radeon display support
    <*> ATI Rage128 display support
    <*> ATI Mach64 display support
    Console display driver support --->
      <*> Framebuffer Console support
Note
To select more than one framebuffer device, it may default to a less than optimal driver. Either use only one framebuffer device or specify which to use by passing the driver to use to the kernel on boot by appending a video line such as video=radeonfb.

Compiling and installing

With the kernel is configured, it is time to compile and install it. Exit the configuration menu and run the following commands:

root #make && make modules_install
Note
It is possible to enable parallel builds using make -j N with N being the integer number of parallel tasks that the build process is allowed to launch. This is similar to the instructions about /etc/portage/make.conf earlier, with the MAKEOPTS variable.

When the kernel has finished compiling, copy the kernel image to /boot/. This is handled by the make install command. When using BootX to boot, the kernel will be copied later.

root #make install

This command will copy the kernel image to /boot. If sys-kernel/installkernel is installed it will call /sbin/installkernel instead and delegate the kernel installation. Instead of simply copying the kernel to /boot, Installkernel installs each kernel with its version number in the file name. Additionally, installkernel provides a framework for automatically accomplishing various tasks relating to kernel installation, such as: generating an initramfs, building an Unified Kernel Image, and updating the bootloader configuration.