2003-07-05 20:19:37

by imunity

[permalink] [raw]
Subject: Kernel Compiling using "make rpm" question PLEASE!!


I would not be asking this question but I have to say someone maybe even
myself will have to make a DOC on this cause there are none!!!!

The convention method for configuring, compiling and installing a kernel I
am very clear on but why cannot find any documents on how to compile it
using "make rpm" or recompile or "rpmbuild -bb"

I have searched the bookstores, http://www.redhat.com, www.tldp, most newgroups and
almost every single search result from http://www.google.com/linux.


Conventional Method:

tar -zxvf kernel.xx or rpm -ivh kernel-source.i386.rpm
ln -s kernel.xx linux
make clean
make mrproper
make menuconfig
make dep
make clean
make bzImage
make modules
make modules_install
make install
mkinitrd



RPM METHOD:

tar -zxvf kernel.xx or rpm -ivh kernel-source.i386.rpm
ln -s kernel.xx linux # I think this step may be need if you have a rpm
kernel source!!

make clean
make mrproper
make menuconfig
make rpm
rpm -ivh /usr/src/redhat/RPMS/i386/kernel-xx.i386.rpm
mkinitrd




Just currious as to why I cannot find something as simple as that for "make
rpm"


Still trying to figure out how to use "rpmbuild -bb"


2003-07-06 19:50:43

by Samuel Flory

[permalink] [raw]
Subject: Re: Kernel Compiling using "make rpm" question PLEASE!!

[email protected] wrote:

>
> Still trying to figure out how to use "rpmbuild -bb"


What you need for that is a rpm spec file. Grab a kernel.src.rpm from
a distribution. Install it, and cd to /us/src/redhat (other distros may
have a different name in /usr./src). Now the sources, and patches
should be in SOURCE, and the spec file in SPEC. Now you can modify/add
the source/patches, and the spec. To create rpms you run "rpm -bb <spec
file>". Of course to get the i686 rpms you want you need to add
"--target i686".

Keep in mind this involves a lot of rpm spec file black magic. Also
most of time you will end up with at least 3 kernel rpms via this
method. You really don't want to do this unless you need to roll your
own custom releases of a distro for some reason.