Getting the Source Code for the Kernel of Linux Fedora 3 Distribution

Posted by Paul Farrow - Under: Mini-ITX, Software

Fedora no longer installs the source for its installations so if you need to rebuild the kernel you will need to get the source the easiest way is as follows:

  1. up2date –get-source kernel
  2. Install kernel-.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/) [NOTE: if this fails you should find the kernel src rpm from your up2date and download it manually and then use rpm -i ]
  3. Change directory to /usr/src/redhat/SPECS/, and issue the following command: rpmbuild -bp –target= kernel.spec (Where target is the desired target architecture.)
  4. On a default RPM configuration, the kernel tree will be located in /usr/src/redhat/BUILD/.
    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--i686-smp.config. Issue the following command to place the desired configuration file in the proper place for building:
  5. cp ./.config
  6. Issue the following command:  make oldconfig if you want to use the oldconfig or make menuconfig if you want to put in new stuff

then read the readme.txt file which comes with Fedora for building but normally do the following

  1. make
  2. make modules_install install

this now updates grub (if your using it) automatically