LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 02-06-2005, 05:14 AM   #1
equus
Member
 
Registered: Nov 2003
Location: France
Distribution: Gentoo
Posts: 37

Rep: Reputation: 15
Installing kernel source rpm


Hello,

I downloaded kernel-2.6.10-1.741_FC3.src.rpm.

When I do rpm -U it copies the contents of the rpm in the directory /usr/src/redhat/SOURCES.

How do I apply the patches and all that stuff ?
 
Old 02-06-2005, 08:37 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,049
Blog Entries: 4

Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Go back to the site and grab the actual rpm - one that doesn't end in .src.rpm.
 
Old 02-07-2005, 04:52 PM   #3
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,074

Rep: Reputation: 52
XavierP, there is no kernel-source rpm anymore. The kernel src.rpm is the intended way to build the fully patched kernel source code yourself: http://fcp.homelinux.org/modules/sma...aq.php?faqid=1
 
Old 02-07-2005, 05:10 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,049
Blog Entries: 4

Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
I haven't run Fedora for a while so had no idea

Quote:
From the Fedora Core 3 Release Notes
kernel
In the past, the process of updating the kernel did not change the default kernel in the system's boot loader configuration.

Fedora Core 3 changes this behavior to set newly-installed kernels as the default. This behavior applies to all installation methods (including rpm -i).

This behavior is controlled by two lines in the /etc/sysconfig/kernel file:
o UPGRADEDEFAULT — Controls whether new kernels will be booted by default (default value: yes)
o DEFAULTKERNEL — kernel RPMs whose names match this value will be booted by default (default value: depends on hardware configuration)

* 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:

o The SRPMS directory on the appropriate "SRPMS" CD iso image

o The FTP site where you got the kernel package

o 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.
 
Old 02-08-2005, 03:51 PM   #5
equus
Member
 
Registered: Nov 2003
Location: France
Distribution: Gentoo
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks to you both, XavierP and misc.

This is the information I was looking for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 06:42 PM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus Suse/Novell 5 12-02-2004 01:48 PM
Problem installing Mandrake kernel source rpm Gibson Linux - Newbie 4 07-30-2004 02:42 PM
Installing Kernel Source RPM eats85 Linux - Newbie 3 08-27-2003 02:04 PM
installing a source rpm Daem0hn Linux - General 2 07-18-2003 06:00 AM


All times are GMT -5. The time now is 10:15 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration