Fedora Core 5 - Kernel Source from src.rpm

This is all nicked form mjmwired
Thought I'd reproduce it in a place I know where to get it quickly. Cheers MJM :-)
Installing the kernel source is typically NOT needed unless you wish to
re-compile your kernel or for some special development. However in most
cases the kernel headers are required.
There are 3 basic steps involved in installing the kernel source.
1. Download the desired kernel source (matching your current kernel if required)
2. Installing the SRC.RPM package
3. Using rpmbuild to prepare the source into a usable state
NOTE: Following these steps will consume over 570MB of disk space!
Obtaining Kernel Source (for default FC5 kernel)
The default kernel source can be found through any Fedora mirror. Look in the
directory "/SRPMS/" under the "/5/" directory . For example:
http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/.
Select: kernel-2.6.15-1.2054_FC5.src.rpm 14-Mar-2006 18:28 46M
Obtaining Kernel Source (for updated FC5 kernel)
If you updated your kernel, then the typically the last 2 or 3 releases of the
source of the kernel will be available though the Fedora updates.
IF YOU REQUIRE you can (try to) match the kernel source with your running kernel.
The following is an EXAMPLE
[root@charon fc5]# uname -r
2.6.15-1.2059_FC5
Look in the update directory on most Fedora mirror sites. For example:
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/.
Obtaining Kernel Source through 'yum'
There are yum utilities which will download the LATEST kernel source.
[root@charon fc5]# yum install yum-utils
[root@charon fc5]# yumdownloader --source kernel
Install the SRC.RPM file and Prepare source
Install the kernel.src.rpm that you chose to install in the previous steps.
Install:
[root@charon fc5]# rpm -ivh kernel-2.6.15-1.1955_FC5.src.rpm
1:kernel ########################################### [100%]
Set it up:
[root@charon fc5]# rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec
The source files will be properly located in '/usr/src/redhat/BUILD/kernel-2.6.15/'
There are 2 useful directories:
'linux-2.6.15.noarch/'
This will have the standard kernel.org kernel WITH Fedora patches and updates
'vanilla/'
This will have the standard kernel.org kernel ONLY (no patches or updates)


1 Comments:
You have posted such a good post. I am very impressed by your work towards your post for sharing such useful information. Thank you! Otherwise If If any one who want to learn linux core to advance Get a free demo call on 9311002620 or visit https://htsindia.com/Courses/modular-courses/redhat-linux-administration-training-course
By
digitalhts, at 9:05 am
Post a Comment
<< Home