Kernel sources should be placed in /usr/src. So you should go into this directory then unpack the sources there:
$ cd /usr/src $ mv linux linux.old $ tar xzf /path/to/linux-2.2.17.tar.gz |
Now, the patches. We will assume that you do want to patch from version 2.2.15 to 2.2.17 and have downloaded the patches needed to do this: go to the newly created linux directory, then apply the patches:
$ cd linux $ gzip -dc /path/to/patch-2.2.16.gz | patch -p1 # $ gzip -dc /path/to/patch-2.2.17.gz | patch -p1 $ cd .. |
Generally speaking, moving from a version 2.2.x to a version 2.2.y requires you to apply all the patches numbered 2.2.x+1, 2.2.x+2, ..., 2.2.y in order . To "descend" from 2.2.y to 2.2.x, repeat exactly the same procedure but applying the patches in reverse order and with option -R from patch (R stands for Reverse). So, to go back from kernel 2.2.17 to kernel 2.2.15, you would do:
$ gzip -dc /path/to/patch-2.2.17.gz | patch -p1 -R $ gzip -dc /path/to/patch-2.2.16.gz | patch -p1 -R |
Next, for the sake of cleanliness (and so that you know where you are), you can rename linux to reflect the kernel version and create a symbolic link:
$ mv linux linux-2.2.11 $ ln -s linux-2.2.11 linux |
It is now time to move on to configuration. For this you have to be in the source directory:
$ cd linux |