Kenneth's step by step instruction
custom kernel with PWC 10.0.4 and K8000
I am writing this for my own use. But others may use it for inspiration.
I am building my own custom kernel for Fedora Core 2 with included support for pwc (the new 10.0.4) and k8000 support (Velleman kit).
Download and unpack the kernel tree
Download the kernel from from http://www.kernel.org
This was built with
Untar the kernel sources in /usr/src
If you downloaded the tar.gz files to /usr/src use the commands below. Otherwise change your current directory to /usr/src and put the path to the tar.gz in front of the filenames.
tar xvfj linux-188.8.131.52.tar.bz2
Create a symbolic link to the new kernel sources.
If there is already one you need to delete it first
ln -s linux-184.108.40.206 linux
Remove the kernel tar.bz2 file
Download the pwc 10.0.4 patch and patch the kernel
Download the new pwc 10.0.4 driver
Download the new generation pwc 10.0.4 driver from http://www.saillard.org/pwc/
The file I used was
Untar the pwc patch
bzip2 -d linux-2.6.8_pwc-10.0.4.patch.bz2
Patch the kernel with new pwc driver, enter the kernel directory and patch
patch -p1 < ../linux-2.6.8_pwc-10.0.4.patch
Note the -p1 (number one)
Re-use the configuration from Fedora
Find the latest configuration file
List the directory
ls -al /boot/config*
Find the latest config file that you wish to build on. I chose 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
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
Activating modules (such as i2c-parport-light for Velleman K8000)
However if you need to activate some extra features you need to configure your kernel. In this example I am activating the modules needed for a Velleman K8000 kit.
Start up your kernel configurator
(text mode for text terminal access)
(graphical user interface mode - requires X)
For activating the modules needed for Velleman K8000 navigate to
Device Drivers -> I2C
Support -> I2C
Hardware Bus Support and activate Parallel Port Adapter
and Parallel Port Adapter (light)
The one that is known to work with kernel 2.6.10 is Parallel Port Adapter (i2c-parport module). Activate both as Module
so that you can choose one or the other.
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'.
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.
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.
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.
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-220.127.116.11
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
Using the new kernel modules.
To activate the pwc simply do
To activate the k8000 this is known to work with kernel 2.6.10
#Make parallel port free for velleman
#Load i2c driver modules for velleman
modprobe i2c-parport type=2
Old pwc 9.0.2 / pwcx 9.0 installation.
- 10 Oct 2004