On Wed, 2004-11-24 at 20:03, Mariano Draghi wrote:You don't need the kernel sources for building most kernel modules.
Please, read the release notes.
Also, please search the list archives for further comments/details on the issue. This pops up every single day here!
Well... I do need the source
No, you don't.
> the NVidia script asks for the source. So
yes I need it, and yes others have asked about NVidia before, but Im not asking about NVidia, Im asking about the kernel source...
Yes, I know what you are asking for. And you don't need the sources. You need the headers.
I have before installed the NVidia driver, which is pretty easy if you have the kernel source, but I have some problems getting the latest source. Can (will) you help here, or am I on my own?
As I said, please, read the *FC3* Release Notes, and search the archives!
As a proof of concept ;) , I'm pasting the reply to the very same issue that someone else gave out earlier today:
Ricardo Veguilla wrote:
The answer to your question:
From file:///usr/share/doc/HTML/index.html
kernel
In order to eliminate the redundancy inherent in providing a separate
package for the kernel source code when that source code already
exists in the kernel's .src.rpm file, Fedora Core 3 no longer includes
the kernel-source package. Users that require access to the kernel
sources can find them in the kernel .src.rpm file. To create an
exploded source tree from this file, perform the following steps (note
that <version> refers to the version specification for your currently-
running kernel):
1. Obtain the kernel-<version>.src.rpm file from one of the
following sources:
* The SRPMS directory on the appropriate "SRPMS" CD iso
image
* The FTP site where you got the kernel package
* By running the following command:
up2date --get-source kernel
2. Install kernel-<version>.src.rpm (given the default RPM
configuration, the files this package contains will be written
to /usr/src/redhat/)
3. Change directory to /usr/src/redhat/SPECS/, and issue the
following command:
rpmbuild -bp --target=<arch> kernel.spec
(Where <arch> is the desired target architecture.)
On a default RPM configuration, the kernel tree will be
located in /usr/src/redhat/BUILD/.
4. In resulting tree, the configurations for the specific kernels
shipped in Fedora Core 3 are in the /configs/ directory. For
example, the i686 SMP configuration file is
named /configs/kernel-<version>-i686-smp.config. Issue the
following command to place the desired configuration file in
the proper place for building:
cp <desired-file> ./.config
5. Issue the following command:
make oldconfig
You can then proceed as usual.
Note An exploded source tree is not required to build kernel modules against the currently in-use kernel.
For example, to build the foo.ko module, create the following file (named Makefile) in the directory containing the foo.c file:
obj-m := foo.o
KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Issue the make command to build the foo.ko module.
Regards,
-- Mariano