FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 08-18-2010, 09:36 AM
Romeo Theriault
 
Default Compile new kernel with same configuration

2010/8/18 "Francisco J. Márquez Gómez" <fjmarquez@chguadalquivir.es>

> Hi,
>
> I've modified the value of a constant inside of kernel and now I need
> compile the kernel for use this modification.
>
> But I need that all configuration and kernel setting keep as in current
> kernel.
>
> How can I compile new kernel, apply same setting and select this kernel for
> run system with it?
>
> I'm using RHEL 5.5 with linux 2.6.18-194.8.1.el5 #1 SMP x86_64 GNU/Linux
>

You can find your current kernels config file that holds all the kernel
settings used for it when compiled in your /boot dir. Yours should be named
'config-2.6.18-194.8.1.el5' . Just compile your kernel with this config
file. This link should help you with the details:
http://wiki.centos.org/HowTos/Custom_Kernel
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-18-2010, 12:51 PM
Romeo Theriault
 
Default Compile new kernel with same configuration

>
> 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.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-19-2010, 11:38 AM
Kevin Krieser
 
Default Compile new kernel with same configuration

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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 03:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org