[Fedora Project Wiki] Update of "Docs/Beats/Kernel" by SamFolkWilliams

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

 



Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Fedora Project Wiki" for change notification.

The following page has been changed by SamFolkWilliams:
http://fedoraproject.org/wiki/Docs/Beats/Kernel?action=diff&rev2=93&rev1=92

The comment on the change is:
moving kernel development stuff to new CustomKernel page

------------------------------------------------------------------------------
  
  Fedora [[GetVal(DocsDict,BeatsVer)]] does not include the kernel-source package provided by older versions since only the kernel-devel package is required now to build external modules. Configured sources are available, as described in the kernel flavors section.
  
+ /!\ For information on kernel development and working with custom kernels, please see the new http://fedoraproject.org/wiki/Docs/CustomKernel page.
- [[Admonition("note", "Instructions Refer to Current Kernel", "To simplify the following directions, we have assumed that you want to configure the kernel sources to match your currently-running kernel. In the steps below, the expression <version> refers to the kernel version shown by the command: {{{uname -r}}}."]]
- 
- Users who require access to Fedora original kernel sources can find them in the kernel .src.rpm package.  To create an exploded source tree from this file, perform the following steps:
- 
- [[Admonition("note", "Do Not Build Packages as Super-user (root)", "Building packages as the superuser is inherently dangerous and is not required, even for the kernel.  These instructions allow you to install the kernel source as a normal user.  Many general information sites refer to `/usr/src/linux` in their kernel instructions.  If you use these instructions, simply substitute `~/rpmbuild/BUILD/kernel-<version>/linux-<version>.<arch>`."]]
- 
-  1. Prepare an RPM package building environment in your home directory.  Run the following commands:
- 
- {{{su -c 'yum install rpmdevtools yum-utils'
- rpmdev-setuptree
- }}}
- 
-   Enter the `root` password when prompted.
- 
-  1. Download the `kernel-<version>.src.rpm` file.  Enable any appropriate source repositories, such as Core, Updates, or Testing, with the `-e` switch:
- 
- {{{yumdownloader -e core-source -e updates-source --source kernel-<version>
- }}}
- 
-   Enter the `root` password when prompted.  If you specify only `kernel` without a version, {{{yumdownloader}}} downloads the source for the latest Fedora kernel from the enabled repositories.
- 
-  1. Install `kernel-<version>.src.rpm` using the command: 
- 
- {{{su -c 'rpm -Uvh kernel-<version>.src.rpm'
- }}}
- 
-   This command writes the RPM contents into `${HOME}/rpmbuild/SOURCES` and `${HOME}/rpmbuild/SPECS`, where `${HOME}` is your home directory.
- 
- [[Admonition("note", "Space Required", "The full kernel building process may require several gigabytes of extra space on the file system containing your home directory."]]
- 
-  1. Prepare the kernel sources using the commands:
- 
- {{{cd ~/rpmbuild/SPECS
- rpmbuild -bp --target $(uname -m) kernel-2.6.spec
- }}}
- 
-   The kernel source tree is located in the `~/rpmbuild/BUILD/kernel-<version>/linux-<version>.<arch>` directory.
- 
-  1. The configurations for the specific kernels shipped in Fedora [[GetVal(DocsDict,BeatsVer)]] are in the `~/rpmbuild/BUILD/kernel-<version>/linux-<version>.<arch>/configs` directory. For example, the i686 configuration file is named `~/rpmbuild/BUILD/kernel-<version>/linux-<version>.<arch>/configs/kernel-<version>-i686.config`. Issue the following command to place the desired configuration file in the proper place for building:
- 
- {{{cp configs/<desired-config-file> .config
- }}}
- 
-  1. Every kernel gets a name based on its version number. This is the value the {{{uname -r}}} command displays. The kernel name is defined by the first four lines of the kernel `Makefile`. The `Makefile` has been changed to generate a kernel with a ''different'' name from that of the running kernel. To be accepted by the running kernel, a module must be compiled for a kernel with the correct name. To do this, you must edit the kernel `Makefile`.
- 
-   For example, if the {{{uname -r}}} returns the string `2.6.17-1.2345_FC6`, change the `EXTRAVERSION` definition from this:
- 
- {{{EXTRAVERSION = -prep
- }}}
- 
-   to this:
- 
- {{{EXTRAVERSION = -1.2345_FC6
- }}}
- 
-   That is, substitute everything from the final dash onward.
- 
-  1. Run the following command:
- 
- {{{make oldconfig
- }}}
- 
-   You may then proceed as usual.
- 
- [[Admonition("note","Building Kernel Binary RPMs","Normally, kernels for Fedora are built using the `rpmbuild` utility and a specfile.  Your results may vary if you use the kernel's built-in `make rpm` target.")]]
  
  === Building Only Kernel Modules ===
  

--
Fedora-relnotes-content mailing list
Fedora-relnotes-content@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-relnotes-content

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Gnome Users]     [KDE Users]

  Powered by Linux