Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to compile kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm from RHEL6 MRG source RPMs on Centos 6 x86_64 system.

It's first time I'm doing this, so I did research on how to do this properly. From what I found, I did:

rpm -ihv kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm 
cd ~/rpmbuild/SPECS
nano kernel-rt.spec 
rpmbuild -bb kernel-rt.spec 2> build-err.log | tee build-out.log

in kernel-rt.spec I've disbleed compilation of variants I don' need - ie compile only rt and firmware. Also defined not to build debuginfo.

After compilation finished, I've got in ~/rpmbuild/RPMS/x86_64/ two files:

kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64.rpm
kernel-rt-devel-2.6.33.9-rt31.75.el6rt.x86_64.rpm

but when I tried to install kernel, I got error message: $ sudo rpm -ihv kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64.rpm error: Failed dependencies: kernel-rt-firmware >= 2.6.33.9-rt31.75.el6rt is needed by kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64

There was no folder ~/rpmbuild/RPMS/noarch - where I would expect it to show up.

Also, I've tried rpmbuild --rebuild kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm, but got same results...

What am I doing wrong? I've seen this question, but it suggests what I tried already and I want to build kernel myself, not use pre-built from SLC.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I'd still recommend using the precompiled realtime kernels if you're not making any drastic driver changes or other optimizations, but if you need to build your own, do the following to generate the proper packages.

rpmbuild -ba --without debug kernel.spec

This builds your kernel.

rpmbuild -ba --target noarch --with firmware --without debug --without doc --without perftool --without perf kernel.spec 

This builds the kernel-rt-firmware package.

share|improve this answer
    
yes i need to add drivers for my raid controller. I've built it using command suggested by you - still didn't get kernel-rt-firmware package built... –  sashk Nov 16 '11 at 3:41
    
Maybe try adding the -with firmware to the build macro in the first statement. I don't have a system to test with at the moment. Also, which RAID card drivers are you trying to add? –  ewwhite Nov 16 '11 at 9:59
    
of course I tried --with firmware - it does not help. LSI 9265-8i –  sashk Nov 16 '11 at 13:50

I've not tried this myself, but there is a rt-firmware SRPM in the repo referenced in the question. Building that might provide the dependency.

share|improve this answer
1  
It didn't compile properly to produce proper .rmp files. I didn't try if recent version compile, as I'm using precompiled RT kernels from Scientific Linux –  sashk Nov 14 '12 at 0:25
cd ~/rpmbuild/SPECS
rpmbuild -bb --without debug kernel-rt.spec --clean

cd ~/rpmbuild/SPECS
rpmbuild -bb --target noarch --with firmware --without debug --without doc --without perftool --without perf kernel-rt.spec --clean
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.