[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a kernel patch



D Qi wrote:

> I made some changes on the kernel source tree (2.4.10) and want to
> make a patch file for it. So I can apply the changes later on rather
> than make an archive for whole thing. But, how can I do it?

Let's say your modified tree is in the current directory and called 
linux-2.4.10. Make sure the tree is clean (make mrproper should do for 
the files generated by the kernel build) and unpack an original 2.4.10 
tree:

tar xzf /where/ever/linux-2.4.10.tar.gz
mv linux linux-2.4.10.orig

now run

diff -urN linux-2.4.10.orig linux-2.4.10 >linux-2.4.10-changes.diff

this should produce a standard kernel patch, that you can (try to) 
apply to a different kernel tree in the usual way:

cd linux-2.4.x
patch -p1 < ../linux-2.4.10-changes.diff

Rene.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/