Build kernel RPM with QoS support

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Buettner
Date:  
Subject: Build kernel RPM with QoS support
On Mar 22, 3:15pm, Benjamin Bostow wrote:

> I am trying to build a kernel rpm with QoS support. I have installed
> the kernel-2.2.17-14.src.rpm and the kernel-source-2.2.17-14.rpm. I
> copied the spec from the .src.rpm install to the /usr/src/linux-2.2.17/
> directory. I then ran make menuconfig and included the option for QoS
> support, then ran rpm -ba kernel-2.2.spec. After I installed the new rpm
> that was created the QoS functions aren't there (ex. tc). Is this the
> correct way to do this? If not what is?


Why do you need to create the RPM? Do you intend to distribute this
kernel to a number of other machines? Or are you just trying to install
a kernel with QoS support on one machine?

If it's the latter, I would just do a normal kernel build / install and
forget about using RPM.

If you really must use RPM, you might want to try doing it something
like this:

    rpm -bc kernel-2.2.spec
    pushd <kernel-build-location>
    cp .config .config.sav
    make menuconfig
    # enable QoS support
    diff -up .config.sav .config >/usr/src/redhat/SOURCES/mykernel-2.2.patch
    popd
    # Edit .spec file and add information about your patch.
    rpm -ba kernel-2.2.spec


You may need to read the .spec file to figure out how .config is
created and create a patch for some other file. (I've never looked
closely at a kernel .spec file to see how it was done.)

In any event, I think the problem with your current approach is that
when you use -ba after running menuconfig, it effectively ignores your
changes since -ba unpacks the sources and patches them before doing the
build. I was thinking about telling you to use the --short-circuit
option, but according to the man page, it won't work with -ba.

Kevin