Linux内核修补问题 [英] Linux kernel patching issue

查看:437
本文介绍了Linux内核修补问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用我的Ubuntu Linux内核正确编译这个特定的内核补丁时遇到了一些麻烦。

I have some trouble getting this particular kernel patch to compile correctly with my Ubuntu Linux kernel.

这个补丁来自一个名为SCST的软件适用于Linux的iSCSI目标。当我运行 patch -p1< put_page_callback-2.6.32.patch 但是当我得到编译我得到大约一个小时左右,然后失败并返回这些错误。

The patch in question comes from a piece of software called SCST it a iSCSI target for Linux. The patch loads fine when I run patch -p1 < put_page_callback-2.6.32.patch but when I got to compile I get about an hour in or so and then make fails and returns these errors.

/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:63: error: redefinition of '__kcrctab_net_get_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:14: note: previous definition of '__kcrctab_net_get_page_callback' was here
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:63: error: redefinition of '__kstrtab_net_get_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:14: note: previous definition of '__kstrtab_net_get_page_callback' was here
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:63: error: redefinition of '__ksymtab_net_get_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:14: note: previous definition of '__ksymtab_net_get_page_callback' was here
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:66: error: redefinition of '__kcrctab_net_put_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:17: note: previous definition of '__kcrctab_net_put_page_callback' was here
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:66: error: redefinition of '__kstrtab_net_put_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:17: note: previous definition of '__kstrtab_net_put_page_callback' was here
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:66: error: redefinition of '__ksymtab_net_put_page_callback'
/root/d1/development/kernel/lucid/source/net/ipv4/tcp_zero_copy.c:17: note: previous definition of '__ksymtab_net_put_page_callback' was here

我有absolutley不知道发生了什么。我不是一个内核开发以任何方式,我只是试图得到这个补丁和另一个工作正常 scst_exec_req_fifo-2.6.32.patch 。所以我可以使这个iSCSI目标以全速运行。

and I have absolutley no idea what is going on. I am not a kernel dev by any means, I am just trying to get this patch and another one which works fine scst_exec_req_fifo-2.6.32.patch. So I can make this iSCSI target run at full speed.

任何想法我能做什么?

* UPDATE **

** UPDATE **

我遵循 https://help.ubuntu.com/community/Kernel/Compile 。更具体地说,该网页上的链接指向 http://blog.avirtualhome.com/2010/05/05/how-to-compile-a-ubuntu-lucid-kernel/

I am following the insructions from https://help.ubuntu.com/community/Kernel/Compile. More specificly a link on that page that goes to http://blog.avirtualhome.com/2010/05/05/how-to-compile-a-ubuntu-lucid-kernel/.

我已经做了一些编译使用这些说明,我的问题是我忘记应用补丁程序或补丁没有采取,但直到现在,他们总是完成。这个新补丁的东西搞了一些东西。

I have already done a few compiles using these instructions, my problems were either I forgot to apply the patches or the patch did not take, but up until now they always completed. Something with this new patch messed something up.

至于为什么iSCSI目标正在搞乱网络部分,它一直与网络性能有关。当我编译目标软件没有补丁它鞭打性能不会好。目标网站是 http://scst.sourceforge.net/index.html p>

As far as why the iSCSI target is messing with the network parts, it apperantly has something to do with the network performance. When I compile the target software without the patch it whines about the performance wont be good. The website for the target is http://scst.sourceforge.net/index.html

推荐答案

在从kernel.org获取适当的内核版本之后,您应该遵循标准的内核编译方法

You should follow the standard kernel compilation method after getting yourself an appropriate kernel version from kernel.org



  1. >应用补丁

  2. sudo make menuconfig,保存默认的.config文件

  3. sudo make

  4. sudo make modules_install

  5. sudo make install

  6. cd / boot

  7. sudo mkinitramfs -o initrd.img-

  1. Extract kernel to a folder
  2. Apply patch
  3. sudo make menuconfig, save default .config file
  4. sudo make
  5. sudo make modules_install
  6. sudo make install
  7. cd /boot
  8. sudo mkinitramfs -o initrd.img-(your version here) (your version again)
  9. sudo update-grub

您现在应该可以看到新内核在启动选项,它应该(希望)启动。

You should now see the new kernel in your boot options and it should (hopefully) boot.

这篇关于Linux内核修补问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆