Building a kernel RPM from source

While it is reasonably easy to build a kernel RPM on a Redhat or CentOS system using the kernel src rpm, another way is to do a standard kernel build (download your kernel from kernel.org), configure as usual. However, instead of just doing a standard “make” or “make bzImage”, do “make rpm“, and voila! You’ll be left with your kernel rpm in /usr/src/redhat/RPMS/{arch}, and your very own src rpm in /usr/src/redhat/SRPMS. Easy, right?