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

RE: building a kernel rpm

All newer vanilla kernels have a 'make rpm' option in the Makefile.  I
just found this option a few months ago.  This make option creates both
a binary RPM and an SRPM, but not a kernel-source RPM like Red Hat's.

I use this option to make my custom kernels and it works quite nicely.
A couple of caveats - the RPM doesn't create an initrd if your system
needs one and I don't believe that it adds the proper lines to your
bootloader (GRUB/LILO).  If you want you can run 'make rpm' after you do
a make menuconfig and then break it (CTRL-C) soon after it starts
tarring up the source and then edit the spec file to have the RPM
perform these operations post-install.  You'll also have to edit the
Makefile to make sure that you're spec file doesn't get overwritten when
you run 'make rpm' again.  

I just remember to run mkinitrd and hand edit my grub.conf after I
install my kernel RPM and all is well.

Hope this helps,

>> -----Original Message-----
>> From: Tzafrir Cohen [mailto:tzafrir@technion.ac.il] 
>> Sent: Saturday, March 29, 2003 3:17 AM
>> To: rpm-list@redhat.com
>> Subject: building a kernel rpm
>> Hi
>> [ I asked this question on redhat-devel and got no answer. I 
>> hope this is
>> a better place]
>> I have a redhat 7.3 system. It has a P4 processor, and it 
>> seems that the
>> default kernel performs really bad with it, so a kernel compilation
>> seems to be required. However I have a principle of keeping my system
>> only of RPMs. So I decided that this is a time to figure out how to
>> build a decent kernel rpm.
>> I looked at the kernel package and it has a frightening amount of
>> scripts. I could not figure out what it does. I tried various
>> command-line parameters, but to no avail.
>> Requirements:
>> 1. minimal modifications to the .src package. It would be 
>> quite nice if
>>    there were none at all. I'm just getting ready for the 
>> next time I'll
>>    fill an urge to change a kernel, and will like to try a 
>> different RH
>>    kernel package.
>> 2. Kernel optimised for my CPU
>> 3. my own .config file (where exactly do I put it?)
>> 4. build just one kernel. Maybe a .src and -doc package, but 
>> I only need 
>>    one kernel image package, and I don't want to waste CPU 
>> time and disk
>>    space on anything else.
>> How can I build a kernel package from source?
>> -- 
>> Tzafrir Cohen                       +---------------------------+
>> http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
>> mailto:tzafrir@technion.ac.il       +---------------------------+
>> _______________________________________________
>> Rpm-list mailing list
>> Rpm-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/rpm-list

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