Re: Compile new kernel with same configuration

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

 



On Aug 19, 2010, at 1:58 AM, Francisco J. Márquez Gómez wrote:

> Thank you very much.
> 
> Then, if I want keep same kernel that I'm running now, I need:
> 
> cp /usr/src/redhat/SOURCES/linux-2.6.18.tar.bz2 /root
> cd /root
> tar -xvf  linux-2.6.18.tar.bz2
> cd linux-2.6.18
> 
> *[apply all redhat patches from /usr/src/redhat/SOURCES]*
> 
> [make my modifications]
> 
> cp /boot/config-2.6.18-194.8.1.el5 ./config
> 
> [compile the kernel]
> 
> Is it right?
> 
> Regards,
> F.J
> 
> El 18/08/2010 14:51, Romeo Theriault escribió:
>>> I have found this ftp:
>>> ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/
>>> 
>>> but when I install the .src.rpm package I found many .patch files, not the
>>> source code "as it".
>>> 
>> It sounds like you're looking in the right place to get the kernel source.
>> It gets installed in /usr/src/redhat/.  If you type:
>> 
>> ls /usr/src/redhat/SOURCES | grep -v patch
>> 
>> you'll see that there is a linux-2.6.xx.tar.bz2 kernel. All those patches
>> are simply the redhat changes to the vanilla kernel. The rpmbuild process
>> will take care of all that for you.
 
This is too much work.  Change to the /usr/src/redhat/SPECS directory and do a rpmbuild -bp kernel-2.6.spec (I'm not at work now, so I may be mispelling the name).  This will extract the source and apply patches under the BUILD directory.  You should be able to find a linux-2.6.18.i686 directory there that you can tar up, modify, and compile anyplace else.  I do this at work since we need to apply some patches to support some different platforms (like touchscreens, PCMCIA issues, etc).  The -bp does the "prep" stage, which extracts source and applies patches.  

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux