Section 3.2. Where to Find the Kernel Source


3.2. Where to Find the Kernel Source

All of the source code for the Linux kernel can be found on one of the kernel.org sites, a worldwide network of servers that mirror the Linux source code, enabling anyone to find a local server close to him. This allows the main kernel servers to be responsive to the mirror sites, and lets users download the needed files as quickly as possible.

The main http://www.kernel.org site shows all of the current kernel versions for the various different kernel trees, as shown in Figure 3-2.

Figure 3-2. The main kernel.org web site


To download the latest stable kernel version, click on the F character on the line for the kernel version. This will download the full source tree. Or you can navigate to the proper subdirectory for all of the 2.6 kernel versions, http://www.us.kernel.org/pub/linux/kernel/v2.6/, shown in Figure 3-3.

Figure 3-3. The 2.6 kernel source directory


It is also possible to download the kernel source from the command line, using the wget or curl utilities, both of which should come with your Linux distribution.

To download the 2.6.17.8 kernel version using wget, enter:

 $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.8.tar.gz --17:44:55--  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.8.tar.gz            => `linux-2.6.17.8.tar.gz' Resolving www.kernel.org... 204.152.191.5, 204.152.191.37 Connecting to www.kernel.org|204.152.191.5|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 51,707,742 (49M) [application/x-gzip] 100%[=============================================>] 51,707,742    35.25K/s    ETA 00:00 18:02:48 (47.12 KB/s) - `linux-2.6.17.8.tar.gz' saved [51707742/51707742] 

To download it using curl:

 $ curl http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.8.tar.gz \ -o linux-2.6.17.8.tar.gz   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 49.3M  100 49.3M    0     0  50298      0  0:17:08  0:17:08 --:--:--  100k 

For a quick and easy way to determine the latest kernel versions, use the information available at http://www.kernel.org/kdist/finger_banner, illustrated by Figure 3-4.

Figure 3-4. Latest kernel version




Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

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