Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Compiling driver modules for Red Hat kernel, sketch



Hi Tomi,

I'd like to add you install instructions to the README's in CVS, would you allow us to do so?

I added some comments, see below:


Tomi Ollila wrote:
Hi

There seems to be problem compiling DVB modules for Red Hat kernels,
whether the problem is with drivers, or not, to exclude misconfiguration
of kernel sources I'm writing this "sketch" document.

I call this sketch, since I'm currently encoding some of my DVB
recordings, and it will take at least 5 hours to complete --
therefore I can not test the commands entered below. My last try
with these were yesterday, with RH kernel-source 2.4.18-26.8.0 --
I could not compile that kernel-source (make dep failed). It has been
time from my previous compile (with 2.4.18-14 -- initial RH 8.0 kernel)
... Anyway, hopefully these "instructions" are useful, even if slightly
incorrect. Needless to say, there is no warranty for this text...

First, one needs to download kernel-source -package that matches the
running kernel. With RH 8.0 it should usually be kernel-source-2.4.18-14
(the initial) or kernel-source-2.4.18-24.8.0 (latest working at 20030309).
rpms of these are available.

From now on, I assume that user has installed kernel-source-2.4.18-14,
for uniprocessor i686 machine, no BOOT, bigmem, debug or so on...

After installing, there should be directory /usr/src/linux-2.4.18-14
available. The required symlink /usr/src/linux does not yet point to
this directory. To make absolutelu sure this will exit. issue:

# rm -f /usr/src/linux
# mv -f /usr/src/linux /usr/src/linux.old$$
# ln -s 2.4.18-14 /usr/src/linux

Now, usually when someone downloads kernel-source-... it is assumed
s/he wants to create custom kernel. Therefore /usr/src/linux/include/linux/version.h may have UTS_RELEASE defined
something else than 2.4.18-14 (like 2.4.18-14custom). if this is the
case, fix the right line there.

Now. The kernel source needs to be "configured" so that it can be used
when compiling other kernel modules. Basically this needs that the
whole kernel needs to be compiled (maybe compiling just kernel modules
might be enough, but I want to be sure...)

# cd /usr/src/linux unless already done.

To configure kernel, one usually needs to do `make config', `make menuconfig'
or `make xconfig' and go through all options... With this path it would be
very difficult to get kernel configured exactly like Red Hat did. Fortunately this step is unnecessary. One can just do:

# cp configs/kernel-2.4.18-i686.config .config

(if one have other processor architecture than i686, see the other files
in `configs' subdirectory).
Before calling 'make bzImage' or 'make modules' you have to run
'make oldconfig' in case you just copied an old .config file into the linux source directory.

In order to get kernel fully configured, The following commands needs to
be executed:

# make dep
# make bzImage
# make modules
This is not necessairy. If you have a valid config file that matches exactly the running kernel you only have to tap 'make oldconfig'. In all other cases you'll have to install your kernel and modules.

Holger



--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index