To apply a patch
To patch your kernel, you need to have before you start, a kernel tree to be patched, and a patch. The kernel tree is either from git/cogito or a compressed tar file from ftp://ftp.kernel.org or its mirrors.
Two different forms of compression are commonly used: gzip, denoted by a gz sufix, and bzip2 denoted by a .bz2 suffix.
To unpack a gzipped tar file do:
tar xzvf linux-2.4.12.tgz
To unpack a bzipped file, do
tar xjvf linux-2.4.20.tar.bz2
Linus's kernels unpack to a file called linux; it's best to rename this after unpacking.
mv linux linux-2.4.20
To do the patch, just do:
cd linux-2.4.20 bzcat ../linux-2.4.20-ia64.patch.bz2 | patch -p1
(You can also use Quilt)
If you start with a git tree, it works almost the same way. But it's easier to grab the appropriate tree directly; in 2.6 IA64 is supported directly with no extra patches.
If you start with a bk tree you can do almost the same thing. (Note: BitKeeper is no longer used for Linux development)
I prefer to copy the tree first:
bk clone -l linux -rv2.4.20 linux-ia64 cd linux-ia64; bk -Ur co
(this assumes you've already cloned Marcello's tree to linux; the -rv2.4.20 option says discard changes after the one tagged 2.4.20. This ensures that the patch will apply cleanly).
You then have two choices about patching the tree:
Use bk import. bk import will import the patch, give you the chance to fixup renamed filoes manually (if any) then check in the lot with a comment `patch', which isn;t very useful.
Use patch (which knows how to check files out for editing) then bk citool to check in the files again., logically grouped into changesets with more meaningful (to you) comments.
So:
Using bk import
bunzip2 linux-2.4.20-ia64.patch.bz2 bk import -tpatch linux-2.4.20-ia64.patch linux-ia64
- Using patch:
bzcat linux-2.4.20-ia64.patch.bz2 |patch -p1 bk citool
(and answer the questions)
