[CentOS] Custom kernel RPM/SRPM
mailing-lists at hughesjr.com
Thu Nov 17 13:23:53 UTC 2005
On Thu, 2005-11-17 at 10:03 -0200, Giovanni P. Tirloni wrote:
> I've built customs kernels from the SRPMs with the following:
> rpmbuild -bp --target=i686 /path/to/spec
> cd /usr/src
> ln -s /usr/src/redhat/BUILD/kernel-x.y.z/linux-x.y.z linux
> cd linux
> make oldconfig
> make menuconfig
> make all
> make modules
> make modules_install
> And it works just fine. The problem now is that I think installing
> that way isn't "cool": I wan to build my own custom kernel RPM/SRPM.
> I thought about doing a "rpmbuild -bp" and change the options. Then a
> "rpmbuild -bc --short-circuit" and a "rpmbuild -bi --short-circuit".
> What's the correct way of doing this?
I would just copy the modified config files and replace the kenrel
config files in SOURCES/
(after you modify the spec, if you want)
you might want to do xxxxx.EL.yourname for the kernel name, maybe not.
Also might want to NOT build kernels youi don't care about (like
highmem) by changing the required variables.
rpmbuild -bs --target xxxx kernel-2.6.spec
(gives you new SRPM (run from SPECS/ dir)
Then you can rebuild the binary kernel with:
rpmbuild -bb --target xxxx kernel-2.6.spec
rpmbuild --rebuild --target xxxx new_kernel_name.src.rpm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.centos.org/pipermail/centos/attachments/20051117/b5ba5a1a/attachment.bin
More information about the CentOS