Kenneth's Custom Kernel With PWC 10.0.7 and Velleman K8000 on Fedora Core 4
How to install pwc in Fedora core 4 AND get Velleman K8000 working.
Velleman requires a kernel module which is not enabled per default in the Fedora kernels.
PWC 10.0.6a and 10.0.7a will not build on stock kernel 2.6.12
Kernel 2.6.11.11 sources fail to build with gcc 4.0.
Solution is to rebuild Fedora FC4 kernel sources.
Download source RPM
http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/SRPMS/kernel-2.6.11-1.1369_FC4.src.rpm
And save them anywhere (in your home dir for example)
Create source tree
Now we need to get from RPM to kernel source tree and located at the good old /usr/src tree.
rpm -Uvh kernel-2.6.11-1.1369_FC4.src.rpm
This writes the RPM contents into
/usr/src/redhat/SOURCES
and
/usr/src/redhat/SPECS
.
Prepare the kernel sources using the commands:
cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-2.6.11.spec
Move source tree to /usr/src
Now we move it to the
/usr/src
tree and make a link called linux pointing to it
cd /usr/src/redhat/BUILD/kernel-2.6.11
mv linux-2.6.11 /usr/src/
cd /usr/src
ln -s ./linux-2.6.11 linux
cd /usr/src/linux
Get right config file
Next step is to get the right config file.
The .config which is already there is for i686 standard single CPU. If you need something else copy the desired config file from the /usr/src/linux/configs directory.
I needed the smp version.
cp configs/kernel-2.6.11-i686-smp.config .config
Start up your kernel configurator
make menuconfig
(text mode for text terminal access)
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 Kernel
Now we build the kernel the standard way.
I forgot to edit the version in the makefile so mine ended up as 2.6.11-prep. So I use this in the path names from now on
make bzImage
make modules
make modules_install - This can take an hour!
make install
It is nice to keep the config we used for some other time.
cp /usr/src/linux/.config /boot/config-2.6.11-prep
Edit the Grub config file
Edit /boot/grub/grub.conf
To activate the new kernel as default set default=0.
Now reboot.
PWC
The pwc part. I installed pwc-10.0.7a
Get rid of old driver
First we need to get rid of the old 9.2 version. Delete the directory and the file in it.
rm -R /lib/modules/2.6.11-prep/kernel/drivers/usb/media/pwc
Unload the old module if it is already there.
rmmod pwc
Prepare the source directory for PWC
Copy the pwc-10.0.7a.tar.gz to any place.
Untar it
tar zxvf pwc-10.0.7a.tar.gz
Build Driver
Enter the directory and build and install the new driver.
cd pwc-10.0.7a
make
make install
Load Module
All you need to do now is load the module.
modprobe pwc
Velleman
Velleman requires a little bit more.
Setup udev for the velleman device
Go to this directory
cd /etc/udev/rules.d
create a new text file called 05-local.rules
I use nano (I hate vi).
nano 05-local.rules
Make just this one line.
KERNEL=="i2c-4", SYMLINK="velleman", MODE="0666"
Save it cntl-O and quit cntl-X
Make video devices accessible to normal users.
If you also want the video devices to be world accessible
The video devices keep on getting rw only for root.
Edit this file.
/etc/security/console.perms.d/50-default.perms
Change this line
<console> 0600 <v4l> 0600 root
to this
<console> 0666 <v4l> 0666 root
And save the file.
In the /etc/udev/rules.d/05-local.rules file I also have this line.
KERNEL=="video*", MODE="0666"
Load Velleman driver
I am not sure about pwc but at least the Velleman driver needs a little help to get loaded.
In
/etc/rc.d/rc.local
I have
# Load i2c driver modules for velleman
modprobe i2c-parport type=2
modprobe i2c-dev
Reboot and hope for the best
Velleman Library - libk8000
The library you need is libk8000. You can find it both as sources and RPM here
http://struyve.mine.nu:8080/index.php?block=k8000
The rpm is not very new but it loads fine on Fedora Core 4. Install it with
rpm -ivh libk8000-2.1.2-1.i386.rpm
--
KennethLavrsen - 24 Jun 2005