Changes

Jump to: navigation, search

Kernel build

169 bytes added, 13:45, 19 February 2007
m
fixed info on modifying kernel configs, corrected ksubrelease (may not contain "-" character)
in appropriate places where similar text lines are.
=== Modifying configs ===If you want to modify Adjust kernel configs, you need to do the changes via the kernel spec file. Insert your modifications after the following part of the spec file:<pre># now run oldconfig over all the config filesfor i in *.config*do mv $i .config</pre>You can add kernel settings for example in the following way:<pre> echo "YOUR_KERNEL_OPTION=m" >> .config</pre>If you try to modify the config files directly (not through the spec file), running rpmbuild will fail with the following error:<pre>make[1]: *** [nonint_oldconfig] Error 1make: *** [nonint_oldconfig] Error 2</pre>Some information on this can be found in the following thread: http://www.redhat.com/archives/fedora-list/2005-October/msg00921.html === Building RPMs version ===
Before rebuilding the kernel make sure that you adjusted the kernel version in <code>kernel-ovz.spec</code>.
This will help you to distinguish binaries then from already existing kernels
with something like
<pre>
%define ksubrelease 1-my1my.kernel.v1
</pre>
=== Modifying configs ===
If you want to modify the kernel config, you need to do the following before you continue with the next step "Building RPMs".
<pre>
# cd $TOPDIR/SPECS
# rpmbuild -bp kernel-ovz.spec
# cd $TOPDIR/BUILD/kernel-2.6.16/linux-2.6.16
</pre>
There you will find the configuration files in the subdirectory <code>config/*.config</code>. Copy the one you want to modifiy to <code>$TOPDIR/BUILD/kernel-2.6.16/linux-2.6.16/.config</code>. Then you can do a make menuconfig or something similar to adjust the kernel configuration. Afterwards copy
<code>$TOPDIR/BUILD/kernel-2.6.16/linux-2.6.16/.config</code> to the <code>$TOPDIR/SOURCES</code> directory, but use the corresponding file name in the target directory.
Some background information on this procedure can be found in the following thread: http://www.arcknowledge.com/gmane.comp.audio.planetccrma.general/2004-11/msg00018.html
=== Building RPMs ===
To rebuild the kernel, type the following commands:
<pre>
21
edits

Navigation menu