Correction to build a custom kernel instructions for x86_64

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

 



Hi,

I had found that the instructions for compiling a custom kernel on
Fedora at http://fedoraproject.org/wiki/Building_a_custom_kernel
worked very well.  And so they do.

However, as they are written, they do not take into account the changes
that are made to the .config file after it is edited, for x86_64.  This
is because they call for the writing of it to
~/rpmbuild/SOURCES/config-x86_64.  The kernel.spec file in
~/rpmbuild/SPECS only allows the following as valid config files (at
least that is how I interpret it):

Source21: config-debug
Source22: config-nodebug
Source23: config-generic
Source24: config-rhel-generic

Source30: config-x86-generic
Source31: config-i586
Source32: config-i686-PAE

Source40: config-x86_64-generic

Source50: config-powerpc-generic
Source51: config-powerpc32-generic
Source52: config-powerpc32-smp
Source53: config-powerpc64
Source54: config-powerpc64-kdump

Source60: config-ia64-generic

Source70: config-s390x

Source90: config-sparc64-generic
Source91: config-sparc64-smp

Source100: config-arm


So either a description of how to add another line in the kernel.spec
file could be included so that the instructions as written are valid:

Add the line:

Source41: config-x86_64

immediately after the line

Source40: config-x86_64-generic

Note that I didn't test this option, I'm just presuming it will be true
based on the logic of it.

Or the instructions could be changed from

   6.  Copy the config file to ~/rpmbuild/SOURCES/:

      cp .config ~/rpmbuild/SOURCES/config-$arch


to

   6.  Replace the appropriate config file in ~/rpmbuild/SOURCES/ by
   copying the .config file you just created:

      cp .config ~/rpmbuild/SOURCES/config-$arch[-generic]

   Determine your choice of destination by listing the existing config
   files and replacing one of them:

      ls ~/rpmbuild/SOURCES/config*

I used this method and it worked.

I noticed this because as I was building the latest kernel packages I
saw that drivers for ISDN were being built, and I had deselected them.
When I compared the config files in /boot from my custom kernel and the
Fedora kernel, they were identical!  Once I replaced
config-x86_64-generic with my custom .config, I was able to shrink the
kernel down to half the generic size by eliminating all the
functionality I don't use, but that Fedora has to include in its
kernels because they have a broad target.  And I'm still pursuing this,
whittling away chunks as I come to understand them (the descriptions in
menuconfig don't always make it clear if I need it or not on my
hardware).

The rpm build time has decreased dramatically, and the system seems more
stable and snappy  (Ha!, that's probably placebo, but maybe not.)

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux