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

Re: How to patch..

On Sun, 2004-10-03 at 01:04, condor_rl@libero.it wrote:
> Hi Eric and all boys on the list...
> > > 
> > > To patch the to should I patch to
> > >,,, and at the end the
> > > Or can I patch the only with the
> > > 
> > 
> > The mm4 patch is against 2.6.8-1. You should not apply mm2, mm3, etc...
> > 
> > If mm5 gets released then you reverse the mm4 and apply mm5. The mm
> > patch is always against the base kernel version, it is not incremental.
> Ok, you give an important detail...
> Suppose the new mm5 patch is released...
> how can I reverse before apply the new patch?
> Could you suggest me the command? So I have an idea how to do...

patch -p1 -R < ../path/to/patch

> > 
> > -- 
> > Eric Gaumer <gaumerel@ecs.fullerton.edu>
> Just another question...
> Suppose I would like to patch the kernel with 2 different patches for
> different problems...for example mm4 and RTC for Real Time
> Clock...
> Should I use the same command:
> patch -p1 < /path/
> patch -p1 < /path/rtc-patch.gz

Uncompress these first.

Apply the large patch first (mm) because chances are that the rtc-patch
will fail here. If the rtc patch isn't against then you may
see hunks that fail. You'll need to fix these failures by hand.

If you are not familiar with C code and/or kernel code, then this may be
difficult for you to fix. It may be easier to have two source trees.
Apply the mm patch to one and the rtc patch to the other. Then you can
create your own patch that has mm and rtc merged together. This gives
you a little flexibility as what the patches were applied to. Bitkeeper
is good for this because you can clone trees easily, using hardlinks
(see below).

> Or should I use a dfferent way?
> If I forget what patches I have installed how can can I see the list of
> installed paches? :)

Yes and no... Just using patch and diff you wont be able to see without
keeping a directory of patches you applied to the tree.

A utility called "Quilt" exists that allows you to push and pop patches.
With this you can see what patches have been applied. Quilt is available
via apt-get. This may sound really cool but be warned... Quilt is not
something I would consider "for newbies". You should have a firm
understanding of kernel patching first.


There is also another utility called ketchup that may be of some help to
you. This is an easy way to keep your tree up to date. It also supports
the mm tree as well as a few others.


You could also check out Bitkeeper. It's free of charge (providing you
keep your source open) and it makes merging changes easier. It's also
GUI driven. Here is an article on kernel source control that makes for a
decent primer.


> Thanks and sorry for the log list of questions...I'm a Newb...
> Lorenzo

Eric Gaumer <gaumerel@ecs.fullerton.edu>
Eric Gaumer <gaumerel@ecs.fullerton.edu>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: