Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to compile the iscsi-target software SCST. It wants me to apply a patch to my Linux kernel in order to allow for certain performance gains. The problem is I still new to Linux development. Where do I begin? How do I apply the patch? Do I need to recompile the kernel? Help!

I am running Ubuntu 10.04.3 amd64

Kernel version 2.6.32-28-server

share|improve this question
    
Yes, you'll need to compile - a patch is a modification of source code, not the binary. How you apply the patch should be in their README (or INSTALL, if they have it). –  new123456 Aug 18 '11 at 20:08

1 Answer 1

up vote 2 down vote accepted

Your Linux distribution usually has its own instructions. Search their website or ask on IRC – or at least tell us the distro; without knowing it, it's impossible to provide a reliable anwer.


The generic instructions are:

  1. Download the kernel source from Kernel.org. "Stable" is probably the best choice. Extract to a convenient place (I use ~/src/linux).

    • Read the file named README.
  2. Once inside the source directory, copy the current kernel's configuration, with:
    zcat /proc/config.gz > .config

  3. Apply the patch, with:
    patch -p1 < foo.patch (try -p0 if it gets rejected).

  4. Compile the kernel with:
    make silentoldconfig && make

  5. Install the modules with:
    sudo make modules_install

  6. Install the kernel image .../linux/arch/i386/boot/bzImage to whatever location your bootloader looks in.

share|improve this answer
    
Oops silly me I forgot that part. I running on Ubuntu 10.04.3 amd64. My kernel is 2.6.32-28-server. –  Solignis Aug 18 '11 at 20:13
2  
@Solignis: help.ubuntu.com/community/Kernel/Compile –  grawity Aug 18 '11 at 20:15
    
Well so far everything is compiling,....taking a long time though. Thanks for the help. –  Solignis Aug 19 '11 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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