Linux patches

1,  How to Apply Kernel Patches

With each new kernel release, there is a corresponding 'patch' The simplest way to patch your kernel is to follow the directions in the Kernel HOWTO -  Patching your kernel. 


How to Apply the Unofficial Kernel Patches
Patches are easy to apply, once you understand a few simple concepts:

* Patches are usually for a  specific version of the kernel . This means old patches may not work with newer kernels.
* Patches are generally built from  'clean' unpatched kernel sources . So, one patch may make a change that causes other patches to fail.
Patches are not part of the released kernel tree , thus do not be suprised it they don't work. Always keep a backup of your original kernel source! 


Now,  on to applying the patches . Normally all you need to do is simply issue the following command:

patch -p0 < patch-file-name-here

This should be done from the /usr/src directory
.

Sometimes, the patch authors do not include the full path to the files that are being patched, in this case you will need to change to the directory that contains the file. Simply look at the patch file, in the first few lines you should see something like this:

---  drivres/block/rd.c.orig  Tue Jul 2 17:08:41 1996
+++  drivres/block/rd.c  Mon Sep 30 19:24:06 1996

This tells you that the file being patched is drivers/block/rd.c and the relative path from the  /usr/src/  directory is included. But if you see something like this:

---  isdn_common.c~  Fri Nov 22 21:33:10 1996
+++ isdn_common.c Mon Mar 31 01:46:57 1997

This tells you that you will need to find the file isdn_common.c and change to the directory containing this file before you apply the patch.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值