4. Installing Speakup on an Existing Linux System

If you already have version 2.2.19, 2.2.20, or 2.4.x of the Linux kernel, you can download the Speakup kernel patch and recompile the kernel you already have. Alternatively, you can download a more recent version of the Linux kernel from ftp://ftp.kernel.org/pub/linux/kernel/vx.y/linux-x.y.z.tar.gz. The latest stable Linux kernel is 2.4.17. This kernel can be downloaded from ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.17.tar.gz. In this instance, x is 2, y is 4, and z is 17. After downloading the new kernel, be sure to put it in the appropriate directory for your system. On Red Hat and Debian, the kernel would generally be saved in the /boot directory, and on Slackware, it would be saved under the / directory.

4.1. Before You Begin

Before you attempt to recompile your kernel, be sure you have the following things:

A detailed list of requirements can also be found in the kernel tree at /usr/src/linux-x.y/Documentation/Changes.

4.2. Making a Boot Disk

The first step in recompiling the kernel is to make a boot disk. This is a precautionary measure in case something should go wrong with the compilation. If you already have a boot disk for your system, go to the next section.

4.3. Obtaining Speakup

Next, you need to download the Speakup patch and untar it, as follows:

  1. Make a copy of the current kernel source files by typing the command cp -r /usr/src/linux /usr/src/linux-x.y at the command prompt.

  2. Download speakup-1.00.tar.gz from http://www.linux-speakup.org/ftp/speakup-1.00.tar.gz, then place the file in the /usr/src directory.

  3. Change directories to the /usr/src directory and type the command tar zxf speakup-1.00.tar.gz to unzip the files.

  4. Change directories to the new speakup-1.00 directory, then type ./install to copy Speakup to the kernel tree and apply the various patches and components to the appropriate kernel files.

    Note: If you get any error messages about failed patches, these problems must be corrected before moving on to the next step. If you encounter any problems, you may want to request help from the Speakup mailing list.

4.4. Compiling the kernel

Once you have applied the Speakup patch with no errors, the next step is to compile the Linux kernel, as follows:

  1. Change directories to the /usr/src/linux directory.

  2. Type the command make mrproper to prepare to compile the kernel.

  3. Type one of the following commands to configure your system. The command you choose will depend on your system setup.

    make config - text-based, interactive program that is presented in linear format; this is the recommended method.
    make menuconfig - text-based menu driven program; X is not required.
    make xconfig - requires X Windows which has no speech support, therefore this method is not recommended.

    Regardless of which method you select, when you get to the console speech output section of the configuration, follow these steps:

    1. When you hear the CONFIG_SPEAKUP prompt, type 'y.' This lets you set up Speakup's configuration

    2. At the submenu which lists all of the available speech synthesizers, select as many synthesizers as you like, or select None if this will be a multi-user machine.

    3. You will also be asked if you want to include the Speakup key map. Normally you will want to answer 'y.' If you answer 'n,' you will have to load a Speakup key map at boot time, using whatever mechanism your distribution uses for loading key maps.

    Note: While stepping through the configuration, pay careful attention to each option, as the defaults provided may not be correct for your system. It is very important to check the value of each option for accuracy, as most compile failures are due to incorrect information in the config file.

  4. Type the following commands to compile the kernel:

    make dep (checks for dependencies)
    make bzImage (creates boot image)
    make modules (creates new modules)

4.5. Installing the New Kernel

Now that the new kernel has been compiled, log in as root and install the kernel as follows:

  1. Type make modules_install to create and add the new modules to the directory in /lib/modules.

  2. Use the cd command to change directories to the /usr/src/linux/arch/i386/boot directory.

  3. Confirm that the file bzImage exists, then copy the file to the boot directory using the command cp bzImage /boot.

  4. Locate your current system.map file and replace it with the system.map file located in the /usr/src/linux directory.

4.6. Updating LILO

Depending on your usage habits, LILO (the Linux loader) may or may not need to be updated on your system after recompiling the kernel. Decide which of the following options applies to you, then follow the corresponding instructions for LILO: