- 论坛徽章:
- 0
|
如何获取FC9内核源码:
http://www.mjmwired.net/resources/mjm-fedora-f9.html#kernelsrc
Look in the update directory on most Fedora mirror sites. For
example:
http://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS/
.
Obtaining Kernel Source through 'yum' (for latest Fedora 9
kernel)
There are yum utilities which will download the LATEST kernel
source. If it does not find anything, then there are no updates (yet)
use the DEFAULT Fedora kernel source.
[mirandam@charon ~]$
sudo
yum install yum-utils rpmdevtools
[mirandam@charon ~]$ cd Download
[mirandam@charon Download]$ yumdownloader --source kernel
2. Install the Kernel Source
Install the kernel.src.rpm (into your user/rpmbuild directory) that
you chose to download in the previous steps.
[mirandam@charon Download]$ rpm -ivh kernel-2.6.25-14.fc9.src.rpm
Ignore group kojibuilder does not exist or user kojibuilder does not
exist warnings.
This will install the kernel source into your user directory (/home/username/rpmbuild).
If you prefer it to be in the sytem location (/usr/src/redhat)
then instead run:
[mirandam@charon Download]$ sudo rpm -ivh kernel-2.6.25-14.fc9.src.rpm
3. Prepare the Source
To prepare the source to be useable:
[mirandam@charon Download]$ rpmbuild -bp --target=$(uname -m) ~/rpmbuild/SPECS/kernel.spec
or if you prefer to run as 'root':
[mirandam@charon Download]$ sudo rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel.spec
The source files will be properly located in ~/rpmbuild/BUILD/kernel-2.6.25/
(for user) or /usr/src/redhat/BUILD/kernel-2.6.25/ (if run as
root).
There are 2 useful directories:
linux-2.6.25.ARCH/
This will have the standard kernel.org kernel WITH Fedora patches
and updates.
The ARCH architecture will match the output of uname -m,
usually i686.
You may use noarch for the --target= option if
you wish.vanilla-2.6.25
This will have the standard kernel.org kernel ONLY (no patches or
updates).
NOTE: The process Fedora uses to build and configure kernels
can be found in greater depth on the Fedora
Wiki. The above information is very basic and meant to allow access
to the source and not necessarily build it.
FC9各种安装包网上下载:
http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/source/SRPMS/
FC9内核头文件下载:
yum install kernel-devel
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64117/showart_2179482.html |
|