![]() | Note |
---|---|
All the steps
described in this section and in the following ones of this chapter
must be performed as |
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.6.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-<version>
directory (where
<version>
is the version of the kernel) with
the new kernel's sources. You can make a link (ln -s
linux-<version> linux) for convenience's sake.
Now, the patches. We will assume that you do want
to patch from
version 2.6.8
to 2.6.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.6.9.bz2 | patch -p1 # bzcat /path/to/patch-2.6.10.bz2 | patch -p1 # cd ..
Generally
speaking, moving from a version 2.6.x
to a version
2.6.y
requires you to apply all the patches numbered
2.6.x+1
, 2.6.x+2
, ...,
2.6.y-1
, 2.6.y
in this order. To
revert from 2.6.y
to 2.6.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.6.10
to kernel
2.6.8
, you would do:
# bzcat /path/to/patch-2.6.10.bz2 | patch -p1 -R # bzcat /path/to/patch-2.6.9.bz2 | patch -p1 -R
![]() | Tip |
---|---|
If you wish to
test if a patch will correctly apply before actually applying it, add
the |
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.6.10 # ln -s linux-2.6.10 linux