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 xjf /path/to/linux-2.4.8.tar.bz2 |
The command mv linux linux.old is required: this is because you may already have sources of another version of the kernel. This command will ensure that you do not overwrite them. Once the archive is unpacked, you have a linux directory with the new kernel's sources.
Now, the patches. We will assume that you do want to patch from version 2.4.8 to 2.4.10 and have downloaded the patches needed to do this: go to the newly created linux directory, then apply the patches:
$ cd linux $ bzcat /path/to/patch-2.4.9.bz2 | patch -p1 $ bzcat /path/to/patch-2.4.10.bz2 | patch -p1 $ cd .. |
$ bzcat /path/to/patch-2.4.10.bz2 | patch -p1 -R $ bzcat /path/to/patch-2.4.9.bz2 | patch -p1 -R |
![]() | If you wish to test if a patch will correctly apply before actually applying it, add the --dry-try option to the patch command. |
Next, for the sake of clarity (and so you know where you are), you can rename linux to reflect the kernel version and create a symbolic link:
$ mv linux linux-2.4.10 $ ln -s linux-2.4.10 linux |
$ cd linux |