January, 2004
Bill May
Original version by Waqar Mohsin
Building on Redhat 9
Adding 2.6.1 Kernel to SuSE 9.0
Adding the 2.6.3 Kernel to Redhat 9.0
This section only applies if you setting up a machine from scratch.
If not, go here
Pick the custom install
option.
Package
Name |
Selected |
X Window System |
31/33 |
GNOME |
35/35 |
KDE |
14/16 |
Editors |
2/4 |
Graphical Internet |
8/14 |
Sound and Video |
14/19 |
Graphics |
10/13 |
Server Configuration Tools |
9/13 |
Web Server |
12/17 |
Development Tools |
35/46 |
Kernel Development |
4/4 |
X Software Development |
18/18 |
GNOME Software Development |
42/48 |
Administration Tools |
11/11 |
The instructions are given in Redhat
Linux 9 Customization Guide. You must have the kernel source installed before continuing
su -
cd /usr/src/linux-2.4
make mrproper
cp config/kernel-2.4.20-i686.config .config
make xconfig
make clean
make bzImage
make modules
make modules_install
make install
/boot/initrd-2.4.20-8custom.img
existsreboot
V4L2 is a work in progress. So far, I've only gotten the 20030717 CVS snapshot to work.
You should read the directions from the V4L2 web site - they only apply for the
versions that we've specified.
v4l2-20030717.tar.gz
to the home directorytar xvfz v4l2-20030717.tar.gz
cd v4l2
mv
/usr/include/linux/videodev.h /usr/include/linux/videodev.h.orig
cp videodev.h /usr/include/linux
cp videodev2.h /usr/include/linux
Makefile
and change depmod
to /sbin/depmod
make
make install
bttv9-20030717.tar.gz
to the home directorytar xvfz bttv9-20030717.tar.gz
cd bttv-0.9.12
Makefile
and change depmod
to /sbin/depmod
make
make install
The V4L2 and bttv drivers are installed in the
/lib/modules/2.4.20-8custom/v4l2 directory. You should see a listing
similar to this:
-rw-r--r-- 1 root
root 4936 Aug 4
18:54 btcx-risc.o
-rw-r--r-- 1 root
root 113484 Aug 4 18:54 bttv.o
-rw-r--r-- 1 root
root 15616 Jul 18 10:48
v4l1-compat.o
-rw-r--r-- 1 root y
root 8084 Jul 18 10:48
v4l2-common.o
-rw-r--r-- 1 root
root 19544 Aug 4 18:54
video-buf.o
The original V4L2 and bttv drivers are installed in
/lib/modules/2.4.20-8custom/kernel/drivers/media/video.
modprobe is a program which
loads/unloads loadable kernel modules
(LKMs). By default, modprobe searches for an LKM in /lib/modules/boot
before looking in /lib/modules/2.4.20-8custom. This can be verified by
using the 'modprobe -c
' command. modprobe also uses
/lib/modules/2.4.20-8custom/modules.dep for resolving module
dependencies.
The bttv driver installation does not remove the original bttv.o entry
from the modules.dep file (bug ???). Since we want to load the bttv
driver (and its dependencies) from the new location
(/lib/modules/2.4.20-8custom/v4l2 directory), an easy way is to rename
the original bttv LKM and remove its entry from the modules.dep file.
We recommend removing all bttv.o files. Do a find . -name bttv.o -print
and make sure all copies of bttv.o are purged.
The following steps do that:
cd /lib/modules/2.4.20-8custom/kernel/drivers/media/video
mv bttv.o bttv.o.orig
  (We recommend rm bttv.o
)cd /lib/modules/2.4.20-8custom
modules.dep
and delete /lib/modules/2.4.20-8custom/kernel/drivers/media/video/bttv.o
and its dependencies.Do a find to make sure that you've overwritten all bttv.o files.
su -
modprobe bttv
modinfo bttv
should display something like
filename:
/lib/modules/2.4.20-8custom/v4l2/bttv.o
description: "bttv - v4l/v4l2 driver module for bt848/878 based cards"
author: "Ralph Metzler & Marcus
Metzler & Gerd Knorr"
license: "GPL"
...
modinfo v4l2-common
should display something like
filename:
/lib/modules/2.4.20-8custom/v4l2/v4l2-common.o
description: "misc helper functions for v4l2 device drivers"
author: "Bill Dirks, Justin Schoeman,
Gerd Knorr"
license: "GPL"
This section describes what I did when updating SuSE to a 2.6.1 kernel with V4L2 support. I'm not 100% happy with the results (it seems to return the default settings for the audio, which on my machine is muted, and microphone off), but it appears to work.
Note: I did not use the 2.6 test kernel sources that come with SuSE 9.0.
First, see the instructions on what RPMs are needed for SuSE 9.0 PRO in the main readme.
EXPORT_SYMBOL(__set_special_pids);
and EXPORT_SYMBOL(set_special_pids);
before the function calls.make;make modules
make KDIR=
kernel source directorymake install; make modules_install
make install
At this point, you may have a bootable kernel. I, on the other hand, did not. It appeared not to load any of the modules for the PCI slots.
This was the difficult part. I went to the /etc directory, and used the generate-modprobe.conf
command to generate a new modprobe.conf. Then I had to add command to install eth0, eth1 and
the bttv driver. I also had to remove the snd_ prefixes from the options for snd-emu10k1 and options snd:
Here's the diff that I had to make after the generate-modprobe.conf
:
< options snd-emu10k1 snd_enable=1 snd_index=0
< options snd snd_cards_limit=1 snd_major=116
---
> options snd-emu10k1 enable=1 index=0
> options snd cards_limit=1 major=116
217a218,221
> install eth0 /bin/true
> install eth1 /bin/true
> install bttv /sbin/modprobe --ignore-install bttv && { /sbin/modprobe -k tuner; /sbin/modprobe -k msp3400; }
Good luck.
Written by TrFremont
This was written 25th February 2004. URLs and available files change over time so if you are attempting this far in the future do not be surprised if things are not the same.
I am no Kernel expert. I did this to get rid of a bug. Mooie helped me a lot with how to do this.
If you use Red Hat 9.0, a Brooktree chip capture card and have installed MPEG4IP and kept it up to date, you probaby have MPEG4IP V1.0 or V1.05, the bttv driver from bttv9-20030717.tar.gz and the V4L2 package distributed with MPEG4IP. The recent revisions contained in those packages cured the a/v sync problems, but there is a another, and more rare bug buried deep in that old bttv driver which sometimes causes video capture to freeze. In order to remove the bug you must update to a recent bttv package, which also needs a more recent v4l2 package, and they both need a more recent linux kernel than 2.4.20, which is the one that was distributed with RH 9.0.
Here are instructions on how to obtain, configure, build and install linux 2.6.3 kernel which contains the latest bttv and v4l2 packages.
If you have other than Brooktree hardware, there are drivers for other video capture systems included. I have not tried them, but they may match your hardware.
You get rid of the bug that causes video capture to hang. No more messing about with extra packages or kernel modules - everything is now available as options right in the new kernel.
The Red Hat organization does not support the use of later kernels, so if you have a Red Hat bug show up, they might not be able to help you solve it. However, the only bug I have found so far is that the memory useage is no longer show correctly in the System Monitor tool. I have not yet investigated how to fix this. Compiling, shells, Mozilla, all seem to work ok with 2.6.3.
This upgrade has been completed on two machines so far. The second machine upgrade went almost like clockwork. One machine had RH9.0 plus all the latest upgrades from Red Hat. The other had no upgrades at all, was stock RH9.0 installed from ISO CDs.
If you have compiled and installed MPEG4IP you should have enough to deal with the kernel.
Download and unpackage the kernel source. Run configure, select options. Make. Make Install. Fix bootloader. Reboot.
Log in as root, go to
http://www.kernel.org
Click on the 2.6.3 link (latest stable at time of writing) and save the
.bz2 file to your /root/ directory.
unzip and untar the files. You will then have a
/root/linux-2.6.3/ directory.
(You can put the files any place, though there is a warning about NOT using
/usr/src/linux area as other files around there may mess things up.)
Make sure you are in root directory -
#cd /root
Reset the ownership of all the package files -
#chown -R root.root linux-2.6.3
Move to the package directory -
#cd linux-2.6.3
(You can read the README file there, it has alternate build commands and
note about versions of compilers needed etc.)
Run the configuration program -
#make menuconfig
(It will check some things, then bring up a menu system for selecting
options.)
You must now select the bttv and v4l2 items, they are _not_ on by default. Navigate through the items, turn on the ones shown [Y] below.
I2C Support [Y] I2C Support I2C Algorithms [Y] bit banging [Y] Video For Linux Video For Linux Video Adapters [Y] BT848 Video For Linux
(If you have a capture card or system other than BT848, select what is appropriate. I do not know how well the other options work)
(Also, you _may_ have to turn on support for the audio card you have. One machine with on-board audio worked with nothing extra. The other machine with a PCI sound blaster card needed its support option enabled before sound worked.)
Possibly -
[Y] for audio device that you have.
Mpeg4ip note: see above as how to configure with OSS enabled.
Exit and save the configuration.
Run make
#make
(It takes less than an hour on 1.7G P4.)
Install
#make install
(Note that if you have to do this a second time, and you are running the on
the new kernel from the first attempt, make install may not work. You have
to reboot to the old kernel to install the new one.)
I use the grub boot loader. Make install puts an entry in /etc/grub.conf however it does not set the boot information correctly, you have to fix that by hand to make it boot properly.
Look for the section that starts 'title Red hat Linux (2.6.3)
Look about two lines below that for the line that starts 'kernel....
If that line ends with 'root=LABEL=/' you need to change that to
something like 'root=/dev/hda3'
If you look at around the 7th line in the file, there may be a comment
that shows the correct root= setting for your system. Use that.
You can change the default boot option by changing the number at the end of the 'default=x' line, make x 0 to select the first of\ption, 1 for the second...
Save the grub.conf file.
Shutdown / restart the machine.
Watch the boot messages, make sure the new 2.6.3 kernel gets selected.
You may see error/warning messages early in the boot process, something like
QM_MODULES: Function not implemented
Likely about initializing USB keyboard, usb mouse, ohci1394.
These _appear_ to be the system still trying to load modules which are not used in this kernel, as they are already in the kernel now. If the rest of the boot proceeds I think you can ignore those warnings.
You may be able to get rid of them by fixing something in /lib/modules. But that may also prevent booting to the old kernel in the future.
mp4live and gmp4player will work without re-compiling them, however on one machine I did re-compile mpeg4ip without incident.
MPEG4IP NOTE: if you went from an non-V4L2 kernel, you will need to re-bootstrap mpeg4ip and recompile
If you have to change something in the kernel config, and recompile the kernel, you might want to
#make mrproper
first, to clean everything up.
If you get lost in changing options and things end up working worse rather
than better, you can start again by
#rm .config
then
#make menuconfig
it will start afresh.
MPEG4IP NOTE - this is a good primer - read the above SuSE install in addition to this if some things are not clear.
Remember, mpeg4ip is not the kernel project - we cannot support your kernel install - we can barely do our own.
Good luck!