Kenneth's Custom Kernel for Velleman K8000 on Fedora Core 4
Update for Fedora 7. It now seems there is no need to compile your own kernel. The device is there per defailt. So now you can jump to Edit the modules.conf file
How to get Velleman K8000 working in Fedora Core 4.
You can also use this guide for other distributions but then you have to find an alternative source of information for downloading and installing the kernel sources.
Velleman requires a kernel module which is not enabled per default in the Fedora kernels.
Solution is to rebuild Fedora FC4 kernel sources.
Download source RPM
The kernel source RPM for Fedora Core 4 can be found here
Look for the kernel-VERSION_FC4.src.rpm file.
I will use the filename kernel-2.6.13-1.1526_FC4.src.rpm in the following.
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.13-1.1526_FC4.src.rpm
This writes the RPM contents into
Prepare the kernel sources using the commands:
rpmbuild -bp --target $(arch) kernel-2.6.spec
Move source tree to /usr/src
Now we move it to the
tree and make a link called linux pointing to it
mv linux-2.6.13/ /usr/src/
ln -s linux-2.6.13 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.13-i686-smp.config .config
Start up your kernel configurator
(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
Open the Makefile in an editor.
Find the line
EXTRAVERSION = -prep
and change it to a name that describes the special kernel version you are building. For example
EXTRAVERSION = -velleman
Now we build the kernel the standard way.
Save the configure file
It is nice to keep the config we used for some other time.
cp /usr/src/linux/.config /boot/config-2.6.13-velleman
Edit the Grub config file
To activate the new kernel as default set default=0.
Reboot the machine
You should now get the new kernel activated.
Edit the modules.conf file
We add an option to modules.conf so that the i2c_parport module is loaded with the option type=2
in an editor.
Add this line
options i2c-parport type=2
Now we want to load our new kernel module
Run these two commands
Try and run
to check that the module is loaded.
Identify the device name assigned.
Go to the directory
You should normally see two devices: i2c-0 and i2c-1. However you may see more. If you have a TV card or a video capture card you will see a device for each BT878 chip. Each device is a directory. If you change directory you will see 3 files: dev, device, and name. If you look at the name the Velleman device is the one called "Parallel port adapter".
In this example the device was i2c-1
Setup udev for the velleman device
Now we create a device alias called velleman instead of the silly i2c-1 and change access rights to it so that all users can access it.
Go to this directory
create a new text file called 05-local.rules
I use nano (I hate vi).
Make just this one line.
KERNEL="i2c-1", SYMLINK="velleman", MODE="0666"
Save it cntl-O and quit cntl-X
Load Velleman driver when booting
The Velleman driver needs a little help to get loaded.
add these lines.
# Load i2c driver modules for velleman
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
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
You can also download it from sources and build it with
make && make install
- 16 Oct 2005