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.
Before you attempt to recompile your kernel, be sure you have the following things:
Gnu C Compiler (GCC)
Gnu Make
binutils
util-linux
isdn4k-utils (if you use an ISDN connection)
modutils
e2fsprogs
reiserfsprogs (if you want to use ReiserFS)
PPP (if you want to use PPP)
Kernel header and source files
A detailed list of requirements can also be found in the kernel tree at /usr/src/linux-x.y/Documentation/Changes.
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.
Next, you need to download the Speakup patch and untar it, as follows:
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.
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.
Change directories to the /usr/src directory and type the command tar zxf speakup-1.00.tar.gz to unzip the files.
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.
Once you have applied the Speakup patch with no errors, the next step is to compile the Linux kernel, as follows:
Change directories to the /usr/src/linux directory.
Type the command make mrproper to prepare to compile the kernel.
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:
When you hear the CONFIG_SPEAKUP prompt, type 'y.' This lets you set up Speakup's configuration
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.
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.
Type the following commands to compile the kernel:
make dep (checks for dependencies) |
make bzImage (creates boot image) |
make modules (creates new modules) |
Now that the new kernel has been compiled, log in as root and install the kernel as follows:
Type make modules_install to create and add the new modules to the directory in /lib/modules.
Use the cd command to change directories to the /usr/src/linux/arch/i386/boot directory.
Confirm that the file bzImage exists, then copy the file to the boot directory using the command cp bzImage /boot.
Locate your current system.map file and replace it with the system.map file located in the /usr/src/linux directory.
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:
If you are the only person using the machine and you selected the appropriate synthesizer during the "make config" process, you can simply type lilo at the command prompt to update lilo. This ensures that the command speakup_synth=synthname is sent during the bootup process, enabling speech automatically.
If you did not select the appropriate synthesizer (or selected "none") during the "make config" process, but you decide you want speech to start automatically during bootup, follow these steps to set up lilo:
Open the file /etc/lilo.conf with your favorite text editor.
Find the section that contains the line label=linux. Make a copy of this section and paste it at the end of the file.
In the copied section, change the line label=linux to label=speakup. Then add the line append="speakup_synth=synthname", replacing synthname as appropriate. Be sure to include the quotes as shown.
Note: If your synthesizer is plugged into a port other than COM1, include speakup_ser=n in the above append line.
When you are finished, the new section should look like the following (depending on your system and synthesizer):
image=/vmlinuz label=speakup append="speakup_synth=dectlk" read-only |
Note: If you have multiple synthesizers in use on the system, you would add new sections for each synthesizer, changing the append line appropriately.
Save your changes and exit lilo.conf.
Type lilo at the command prompt.
Type the command shutdown -r now to reboot the system. The system should start talking as soon as it reboots.
Finally, if the Speakup machine will have multiple users, but you do not want Speakup to start automatically, do not change the lilo.conf file. If you want Linux to be speech-enabled for that session, type speakup_synth=synthname speakup_ser=n (substituting synthname and n as appropriate) at the boot: prompt.