I have the source of Linux 3.4.0 to which I added some modifications. I know that here (ftp://ftp.kernel.org/pub/linux/kernel/v3.x/) I can find all the 107 patches that need to be applied to my source to update it to the 3.4.107 version.

I read that I have to apply them one by one: first the 3.4.1, then the 3.4.2, then the 3.4.3 etc.

But my doubt is: can I apply directly the 3.4.107 patch?

I opened the 3.4.107 patch file and noticed that it changes SUBLEVEL = 0 in Makefile to SUBLEVEL = 107, so I thought that this means that it is meant to be used by devs who still have got the 3.4.0 source. What's more, I also noticed that the size of the patch files increases from 3.4.1 to 3.4.107, this seems to confirm my idea that every patch contains:

  • all the changes that are included in the previous patches
  • its new fixes.

Can you tell me whether I'm right or not?

  • Why not just do a make oldconf? – SailorCire Jun 2 '15 at 17:51
  • I have 3.4.0 source and I want to update it to 3.4.107 with patches (I've seen many devs doing this). This is why I asked my question. – Tomoms Jun 2 '15 at 18:05
  • 1
    Just a suggestion: If you're modifying it, use a git clone instead. That should make your life much easier in general. – derobert Jun 2 '15 at 18:44

Each patch in https://www.kernel.org/pub/linux/kernel/v3.x/ applies to the first release of the corresponding series, so you should apply https://www.kernel.org/pub/linux/kernel/v3.x/patch-3.4.107.xz directly to your 3.4.0 source tree. Incremental patches are available, but they're stored separately, in https://www.kernel.org/pub/linux/kernel/v3.x/incr/; you would use these to patch an already-patched tree (e.g. if you want to upgrade your 3.4.107 tree to a future 3.4.108).

As derobert suggests, you'll find keeping up with kernel changes much easier if you work in a copy of the corresponding git stable repository; that will allow you to rebase your patches onto new releases as they come, and benefit from the merge tools available in that context.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.