Tuesday, January 13, 2009

Intel Wireless Wi-Fi 5100 injection working

OS: kernel (Ubuntu Intrepid)
Card: Intel 5100AGN

Get the tools and kernel source so you can recompile.
"sudo apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 linux-source"

Go to your source directory and unpack the kernel source, and go into the source directory.
"cd /usr/src"
"sudo tar jxvf linux-source-2.6.27.tar.bz2"
"cd linux-source-2.6.27"

Copy your existing kernel configuration into the linux source folder. This allows you to keep your existing settings, but add in support for injection.
"sudo cp /boot/config-`uname -r` ./.config"

Take the 3 patched source files posted at the top and replace the ones in your linux source folder.
"sudo mv iwl-sta.c iwl-tx.c iwl-agn.c /usr/src/linux-source-2.6.27/drivers/net/wireless/iwlwifi"

Now go to the root directory of your linux source code (/usr/src/linux-source-2.6.27) and begin the build, now that you have put the 3 modified files in.
"cd /usr/src/linux-source-2.6.27"
"sudo make-kpkg clean"
"sudo fakeroot make-kpkg - -initrd - -append-to-version=-injection kernel_image kernel_headers"

The compile to rebuild the kernel will take a few minutes. Once it completes with hopefully no errors, you should see 2 packages that have been built.

Install the new kernel and headers that you just compiled by using dpkg. This will add the new kernel automatically to your boot menu options.
"sudo dpkg -i linux-image-"
"sudo spkg -i linux-headers-"

Once you've completed this simple process, reboot your computer and when your grub boot menu comes up, you will see your new kernel.
Select your new kernel and boot it. Because you copied your existing configuration and only modified the wifi drivers, everything should be the same.

No comments: