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

[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 KarstenWade:
http://fedoraproject.org/wiki/Docs/Beats/Kernel

The comment on the change is:
flush left converts to XML best

------------------------------------------------------------------------------
  http://www.kernel.org/
  
  To obtain a list of these patches, download the source RPM package and run the following command against it:
+ 
-   {{{ rpm -qpl kernel-<version>.src.rpm
+ {{{rpm -qpl kernel-<version>.src.rpm
  }}}
  
  == Changelog ==
  
  To retrieve a log of changes to the package, run the following command:
+ 
-   {{{ rpm -q --changelog kernel-<version>
+ {{{rpm -q --changelog kernel-<version>
  }}}
  
  If you need a user friendly version of the changelog, refer to http://wiki.kernelnewbies.org/LinuxChanges. A short and full diff of the kernel is available from http://kernel.org/git. The Fedora version kernel is based on the Linus tree.
@@ -41, +43 @@

  
  You may install kernel headers for all kernel flavors at the same time. The files are installed in the `/usr/src/kernels/<version>-[xen0|xenU|kdump]-<arch>/` tree. Use the following command:
  
-   {{{ su -c 'yum install kernel-{xen0,xenU,kdump}-devel'
+ {{{su -c 'yum install kernel-{xen0,xenU,kdump}-devel'
  }}}
     
  Select one or more of these flavors, separated by commas and no spaces, as appropriate.  Enter the root password when prompted.
@@ -56, +58 @@

  == Following Generic Textbooks ==
  
  Many of the tutorials, examples, and textbooks about Linux kernel development assume the kernel sources are installed under the `/usr/src/linux/` directory. If you make a symbolic link, as shown below, you should be able to use those learning materials with the Fedora Core packages. Install the appropriate kernel sources, as shown earlier, and then run the following command:
+ 
-   {{{ su -c 'ln -s /usr/src/kernels/kernel-<all-the-rest> /usr/src/linux'
+ {{{su -c 'ln -s /usr/src/kernels/kernel-<all-the-rest> /usr/src/linux'
  }}}
  
  Enter the `root` password when prompted.
@@ -73, +76 @@

  
   1. Prepare a RPM package building environment in your home directory.  Run the following commands:
  
-   {{{ su -c 'yum install fedora-rpmdevtools yum-utils'
+ {{{su -c 'yum install fedora-rpmdevtools yum-utils'
  fedora-buildrpmtree
  }}}
  
@@ -82, +85 @@

   1. Enable the appropriate `source` repository definition.  In the case of the kernel released with Fedora Core 6, enable `core-source` by editing the file `/etc/yum.repos.d/fedora-core.repo`, setting the option `enabled=1`.  In the case of update or testing kernels, enable the `source` definitions in `/etc/yum.repos.d/fedora-updates.repo` or `/etc/yum.repos.d/fedora-updates-testing.repo` as appropriate.
  
   1. Download the `kernel-<version>.src.rpm` file:
+ 
-   {{{ yumdownloader --source kernel
+ {{{yumdownloader --source kernel
  }}}
  
    Enter the `root` password when prompted.
  
   1. Install `kernel-<version>.src.rpm` using the command: 
+ 
-   {{{ rpm -Uvh kernel-<version>.src.rpm
+ {{{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.
@@ -96, +101 @@

  [[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
+ {{{cd ~/rpmbuild/SPECS
  rpmbuild -bp --target $(uname -m) kernel-2.6.spec
  }}}
  
    The kernel source tree is located in the `${HOME}/rpmbuild/BUILD/kernel-<version>/` directory.
  
   1. The configurations for the specific kernels shipped in Fedora Core [[GetVal(DocsDict,BeatsVer)]] are in the `configs/` directory. For example, the i686 configuration file is named `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
+ {{{cp configs/<desired-config-file> .config
  }}}
  
    You can also find the `.config` file that matches your current kernel configuration in the `/lib/modules/<version>/build/.config` file.
@@ -111, +118 @@

   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
+ {{{EXTRAVERSION = -prep
  }}}
  
    to this:
+ 
-   {{{ EXTRAVERSION = -1.2345_FC6
+ {{{EXTRAVERSION = -1.2345_FC6
  }}}
  
    That is, substitute everything from the final dash onward.
  
   1. Run the following command:
+ 
-   {{{ make oldconfig
+ {{{make oldconfig
  }}}
  
    You may then proceed as usual.
@@ -129, +139 @@

  == Building Only Kernel Modules ==
  
  An exploded source tree is not required to build a kernel module, such as your own device driver, against the currently in-use kernel. Only the `kernel-devel` package is required to build external modules. If you did not select it during installation, use '''Pirut''' to install it, going to  '''Applications > Add/Remove''' software or use {{{yum}}} to install it. Run the following command to install the `kernel-devel` package using {{{yum}}}.
+ 
-   {{{ su -c 'yum install kernel-devel'
+ {{{su -c 'yum install kernel-devel'
-  }}}
+ }}}
  
  For example, to build the `foo.ko` module, create the following `Makefile` in the directory containing the `foo.c` file:
+ 
-   {{{ obj-m := foo.o
+ {{{obj-m := foo.o
  
  KDIR  := /lib/modules/$(shell uname -r)/build
  PWD   := $(shell pwd)


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

  Powered by Linux