PWC - Installation Patched Kernel Kernel 2x 6

Install By Patching and Re-building Kernel 2.6

This document describes how to patch your kernel sources to include pwc 10.0.6.

Download The Linux Kernel Sources

Download the Linux Kernel sources that fits your current kernel. How to do this depends on your distribution. You may already have them installed. You can also choose to download kernel sources from which will require that you configure the kernel yourself.

Unpack The Source Of The Linux Kernel

If you chose to install the kernel sources from your distribution all you need to do is install the package using the package installer (GUI program, RPM, apt-get etc etc).

tar xvfj linux-2.6.10.tar.bz2

If there is already one you need to delete it first rm linux

ln -s linux-2.6.10 linux

Remove the kernel tar.bz2 file

rm linux-2.6.10.tar.bz2

Download the pwc 10.0.X patch and patch the kernel

Download pwc patch

Download the patch that matches your kernel.

Example: linux-2.6.10_pwc-10.0.6.patch.bz2 for a 2.6.10 kernel

Untar the pwc patch

bzip2 -d  linux-2.6.10_pwc-10.0.6.patch.bz2

Patch the kernel with new pwc driver, enter the kernel directory and patch

cd /usr/src/linux

patch -p1 < ../linux-2.6.10_pwc-10.0.6.patch

Note the -p1 (number one)

Re-use the configuration from your distribution

Find the latest configuration file

For distributions such as RedHat and Fedora this is how you reuse your current configuration.

List the directory /usr/boot

ls -al /boot/config*

Find the latest config file that you wish to build on. Example here is the one that came with the Fedora 2.6.8-1.521 kernel. Now copy it to the /usr/src/linux directory and give it the name .config

cp /boot/config-2.6.8-1.521 /usr/src/linux/.config

Configure your kernel.

If you have nothing to change in kernel

If you have nothing to change all you need to do is run

make oldconfig

Activating modules

However if you need to activate some extra features you need to configure your kernel.

Start up your kernel configurator

make menuconfig (text mode for text terminal access)


make xconfig (graphical user interface mode - requires X)

Activate any modules needed including the PWC module.

Finally save and exit

Build the new kernel and kernel modules

Compile the kernel - make bzImage

If you have already built a kernel before you can skip this step. You then only have to run 'make modules' and 'make modules_install'.

make bzImage

Compile all the kernel modules - make modules

Next step is to make all the modules. This takes a long time. Depending on your machine from 30 minutes to several hours. Time to open a beer.

make modules

Install the new kernel and kernel modules

Install the modules - make modules_install

Next step will copy all the built modules to /lib/modules/kernel_version. This also takes some minutes.

make modules_install

Install kernel - make install

Now we install the kernel itself. This copies the kernel files into /boot and adds the new kernel to the menu in grub.conf.

make install

Save your configuration for another good time.

I suggest copying your newly made .config to /boot so that you have it for later. Use the standard naming conversion.

cp /usr/src/linux/.config /boot/config-2.6.10

Edit grub.conf

Edit the /boot/grub.conf file so that it chooses the kernel you want per default. Remember that it counts from zero.

To activate the new kernel as default set default=0.

Using the new kernel modules.

If you built a new kernel you need to boot the machine to activate the new kernel.

Update module dependency and map files

If you booted the machine this should not be needed. It does not harm either.
# depmod -a

Unload old pwc/pwcx modules

If you already had an old version of pwc/pwcx installed you need to unload them first. You can skip this if you rebooted the machine. If you are not sure run the commands anyway. They will not harm anything.
# rmmod pwcx
# rmmod pwc

Load the new module

Finally load the new pwc module. Note that there is no longer any binary pwcx module to worry about. It is all in the pwc module
# modprobe pwc

-- KennethLavrsen - 11 Nov 2004
Topic revision: r3 - 04 Dec 2004, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions. Kenneth only maintains the wiki.
Luc Saillard is the author of the PWC driver and he does not like direct emails either. Please join the Mailing List and ask your questions there.