Getting New Kernel Sources


The Linux kernel has always been available free for the download. You can obtain kernel tarballs with your favorite FTP client or web browser from ftp.kernel.org or (preferably) one of the 116 (and counting) mirrors listed at http://www.kernel.org/mirrors. A kernel compressed by bzip2 is around 35MB, while the same tarball compressed with gzip is around 42MB.

In the v2.6 download directory, you will find a plethora of download choices (see Figure 24.1 for a browser-eye view).

Figure 24.1. This selection of a kernel mirror FTP directory shows the variety of download options.


These include all the sublevel versions of the 2.6 kernel, compressed with different tools, along with digital signature files (with the .sign extension) to validate the kernel as official. "Patch" versions, with just the patches from that iteration, are also stored here (you'll learn about these in the next section). The directory also has changelog files for each iteration, indicating the changes from the previous release.

To download a full kernel, select the version you want, with the compression format you're most comfortable with. The SUSE Linux GUI archive programs can handle both gzip and bzip2 formats, so you can get the smaller bzip2 file.

After it is downloaded, move the package to a directory other than /usr/src (keeping it in your download directory is perfectly fine) and extract it to your home directory. From the shell, the command for a bzip2 file is tar -xjvf linux-2.6.10.tar.bz2, and for a gzip archive, type tar -xzvf Linux-2.6.10.tar.gz.

Tip

Use your Tab key to take advantage of your shell's file-completion feature when extracting a downloaded kernel. In the preceding example, type tar -xjvf linux and then press Tab to complete the filename.


Once the source tarball is unpacked, you will see a new directory with the correct kernel version number. Copy or move this directory (as the SuperUser) to /usr/src. Create a symbolic link (also known as a symlink) of linux-2.6 to the new kernel. From the shell, type the following:

rm /usr/src/linux-2.6 ln -s /usr/src/linux-2.6.10 /usr/src/linux-2.6 

When you create this symlink, you can get creative, allowing multiple kernel versions to be compiled and tailored for different functions. Change the symlink to the kernel directory you want to work on.

Caution

The correct symlink is critical to have make work properly. Always have the symlink point to the version of the kernel sources you're working with.




SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net