Re: building from kernel source rpm

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

 



On 11/28/2012 09:46 AM, Bryn M. Reeves issued this missive:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/28/2012 05:07 PM, JD wrote:
The main point is that the build takes too darned long. On my
unicore cpu, it takes almost 2 days. Building bazillions of useless
modules is a great waste of time and machine.

If you want to change the set of modules enabled you'll have to do a
bit more as the kernel .config options aren't exposed in the spec file
in a way that you can control via rpmbuild options.

That said, you should check out Richard's suggestion as you may find
that it's the many variant (up/smp/pae/debug/debuginfo etc.)
sub-packages that are chewing up the time for you. If turning those
off gives you an acceptable build time it's less invasive than munging
the KConfig options to drop unneeded modules.

If you decide you do need to do that though you'll need to install the
SRPM (either with bare RPM build directory or via mock) so that you
can get access to the individual sources and patches that make it up.

If you're using the normal RPM directory layout then the files you're
interested in will end up in $rpmbuild/SOURCES (where $rpmbuild is
whatever RPM's %_topdir macro is set to).

For the kernel the interesting files are config-*-generic,
config-*-smp etc., Makefile.config and a perl script named merge.pl:

$ cd rpmbuild/SOURCES
$ ls config-* merge.pl Makefile.config
config-arm-generic		config-powerpc32-generic
config-arm-highbank		config-powerpc32-smp
config-arm-imx			config-powerpc64
config-arm-kirkwood		config-powerpc-generic
config-arm-omap-generic		config-rhel-generic
config-arm-tegra		config-s390x
config-debug			config-sparc64-generic
config-generic			config-x86-32-generic
config-i686-PAE			config-x86_64-generic
config-local			config-x86-generic
config-nodebug			merge.pl
Makefile.config

The structure of the config files is fairly self-explanatory;
config-generic is the global catch-all and architectures and variants
(e.g. PAE, smp) can override specific values as needed.

If you just want to make a few local changes you can drop them into
config-local - this should have the highest precedence and is is
automatically merged by kernel.spec during %prep.

I reiterate:

	1. Install the kernel source RPM.

	2. Navigate to your ~/rpmbuild/SPECS directory.

	3. Do "rpmbuild -bp --target=x86_64 kernel.spec" or
	   "rpmbuild -bp --target=i686 kernel.spec" depending on your
	   processor.

	4. Once that's complete, navigate to your
	   ~rpmbuild/BUILD/kernel-3.6.fc17/linux-3.6.7-4.fc17.x86_64
	   directory. Read the "README" file. I say again, read the
	   README file!

	5. Run "make nconfig" or "make xconfig" or whatever
	   "make *config" floats your boat and bugger the configuration
	   as you see fit.

	6. Run "make" to build the kernel as you've specified. Follow
	   the directions in the README file's "COMPILING the kernel"
	   section.

That README file is chock full of what you need to do. This is the way
customized kernels are built. Always has been, probably always will be.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-     I was married by a judge.  I should have asked for a jury.     -
-                                                   -- Groucho Marx  -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux