Hi, 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? Thanks in advance, -- Giovanni P. Tirloni http://blog.tirloni.org
can you explain more in details the methos to do the sourcecode to then compiling a custom kernel. i get the kernel-2.6.9.22xxx.src.rpm from centos mirrors, i'd installed then edit spec (1 to build) then rpmbuild -ba --target=i686 /path/to/spec ( i want to know whay i have to do this if the only thing that i want its the source kernel) OK, at this time my pc was compiling 10 hours ( i dont know what are compiling and what for ?, i dont need any binary i need the kernel sources) 10 hours later i had a lot of rpm, one sources, same devel, an other , so i only want the sources so i did: rpm -ivh kernel-sourcecodexxxx.rpm , succesfully, but i dont get a "usr/src/linux-xxx" folder, why? , instead i get a folder in /usr/src/kernels/ with the number of the kernels sources ok, so i open this folder and did: mrproper , at the end its say that dont have the rule "xx" and if i do : make help, the list of rules broke at the rpm-pkg rule, and say the same : no rule "xx" what means that? somebody knows? or somebody have an explain method to do an correct kernel compilation from the x.src.rpm package , i would like that explain what for are each command and argument. thanks, i will wainting for some response. lucho from argentina ----- Original Message ----- From: "Giovanni P. Tirloni" <gpt at tirloni.org> To: "CentOS mailing list" <centos at centos.org> Sent: Thursday, November 17, 2005 9:03 AM Subject: [CentOS] Custom kernel RPM/SRPM> Hi, > > 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? > > Thanks in advance, > > -- > Giovanni P. Tirloni > http://blog.tirloni.org > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
On 11/17/05, Giovanni P. Tirloni <gpt at tirloni.org> wrote:> Hi, > > 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? > > Thanks in advance,Pardon me while I pull out Bryan J Smith's soap box for a minute (I'm SORRY... I couldn't resist. It's nothing personal Bryan.. just felt like some pre-coffee humor this morning) and preach about NOT REBUILDING your own enterprise kernel. I won't preach too much though, as you're on the right track with it. The best how-to that I'm aware of so far is currently here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/ and details the basic steps you should take. /BJS flamesuit ON! -- Jim Perrin System Architect - UIT Ft Gordon & US Army Signal Center
On Thu, 2005-11-17 at 10:03 -0200, Giovanni P. Tirloni wrote:> Hi, > > 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/ then do: (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 OR rpmbuild --rebuild --target xxxx new_kernel_name.src.rpm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20051117/b5ba5a1a/attachment.sig>