How do I recompile the kernel?

Jeremy Thompson jeremy.a.thompson+fedoralist at gmail.com
Mon Feb 13 18:35:08 UTC 2006


On 2/13/06, Neil Cherry <ncherry at comcast.net> wrote:
>
> Jeremy Thompson wrote:
> >
> >
> > On 2/13/06, *Neil Cherry* <ncherry at comcast.net>
> >     what I did so far:
> >
> >     wget
> >
> ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/4/SRPMS/kernel-2.6.15-1.1831_FC4.src.rpm
> >     rpm -ihv ~/kernel-2.6.15-1.1831_FC4.src.rpm
> >
> >     # cd ../BUILD/kernel-2.6.12/linux-2.6.12/
> >
> >     cd /usr/src/redhat/SPECS
>
> *** <- Right here (see below)
>
> >     rpmbuild -bp --target=i686 kernel-2.6.spec
> >     cd ../BUILD/kernel-2.6.15/linux-2.6.15/
> >     make xconfig
> >     make rpm
> >
> >     And when it's done I'll do this:
> >
> >     cd /usr/src/redhat/RPMS/i386/
> >     rpm -ivh kernel-2.6.15prep-1.i386.rpm
> >     cd /boot
> >     mkinitrd initrd-2.6.15-prep.img 2.6.15-prep
> >
>
> > You know I wanted to ask this question a few days ago.. thanks for
> > taking the bullet for me.  This is exactly what I needed.  I have
> > another question though.  If you needed to patch.  WHere would it go in
> > the process?  Where would you issue the 'patch -pl' command?
>
> Warning: I'm guessing here!
>
> Actually I got this from the list so thanks goes out to other
> member of the list. See where I put the note above (***), that's
> where I add my patches. First I'd take a look at the kernel-2.6.spec
> and find the last patch. Just before:
>
> # END OF PATCH DEFINITIONS
>
> I'd add something like:
>
> Patch19999: my-patchfile.patch
>
> Then a little later in the file:
>
> #%patch10004 -p1
>
> %patch199999 -p1
> # END OF PATCH APPLICATIONS


So, instead of issuing a command like -

Example Only -

patch -p1 < /usr/src/device-mapper.1.01.05/patches/linux-2.4.28-pre4-devmapper-ioctl.patch

You would add it to the spec file to be automatically included when you did
the  'rpmbuild -bp --target=i686 kernel-2.6.spec'

I might figure all this stuff our after all.....

JT



Then I'd put my patch file in /usr/src/redhat/SOURCES/ and
> continue the process. Just make sure that your patch isn't
> already in there.
>
> I hope that helps.
>
> --
> Linux Home Automation         Neil Cherry       ncherry at linuxha.com
> http://www.linuxha.com/                         Main site
> http://linuxha.blogspot.com/                    My HA Blog
> http://home.comcast.net/~ncherry/               Backup site
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060213/7b87e16a/attachment-0001.htm>


More information about the fedora-list mailing list