DevHeads.net

Easiest making kernel rpms from upstream git

Today I've wrote article w/ many notes about bisecting kernel [0], but
I've used make bzImage, make install and the same commands bypassing RPM
and I have IMHO good idea to write utility, that will be build rpm w/o/
Fedora patches, changelogs, etc. simple rpms w/ one command.

We will use "utilityname `git rev-parse HEAD` f19" instead of "make
bzImage && make modules" and "yum install ./rpms/*.rpm" instead of "make
install && make modules_install".

This software should increase the effectiveness, simplify the build test
kernels, simplify to work w/ installed kernels (e.g. remove). Also we
can easy provide rpms to bugreport for testing regressions, etc.

I see alike software at bubuntu wiki [1].

Would anyone besides me find this useful enough for me to keep working
on it?

[0]https://fedoraproject.org/wiki/User:Ignatenkobrain/Kernel/Bisection
[1]https://wiki.ubuntu.com/Kernel/KernelBisection#Build_Upstream_Test_Kernel

Comments

Re: Easiest making kernel rpms from upstream git

By Robin 'cheese' Lee at 08/28/2013 - 21:29

On Wed, Aug 28, 2013 at 9:53 PM, Igor Gnatenko
<i.gnatenko. ... at gmail dot com>wrote:

-robin

Re: Easiest making kernel rpms from upstream git

By Igor Gnatenko at 08/29/2013 - 00:23

On Thu, 2013-08-29 at 10:29 +0800, Robin Lee wrote:

Re: Easiest making kernel rpms from upstream git

By Ian Malone at 08/28/2013 - 17:55

On 28 August 2013 14:53, Igor Gnatenko <i.gnatenko. ... at gmail dot com> wrote:
To be honest I did this recently on F19 and found that the build
process (after git checkout, copy config) went like:
As normal user:
make oldconfig
make -j4
(well, j3 was better for me, but this is from the example
<a href="http://wiki.gentoo.org/wiki/Kernel_git-bisect" title="http://wiki.gentoo.org/wiki/Kernel_git-bisect">http://wiki.gentoo.org/wiki/Kernel_git-bisect</a>)

As root:
make modules_install
make install
(most guides don't mention you only need root for the install steps)

And this did the dracut for me fine, the kernel also showed up in the grub menu.
What would be nicer to see is dealing with cleaning up the previous
build kernel which seems to get left out. So far as I can see this
requires:
remove from boot the matching initramfs, System.map and vmlinuz
run grub2-mkconfig -o ... (removes old entry)
remove the corresponding /lib/modules/3...

Re: Easiest making kernel rpms from upstream git

By Kashyap Chamarthy at 08/28/2013 - 13:31

On 08/28/2013 07:23 PM, Igor Gnatenko wrote:

Incidentally, just today, I was building upstream kernels manually (for testing some KVM
specific things). I don't build Kernels often. After some trial and error, I ended up with
this sequence:

$ make -j6 && make bzImage && make modules
$ make modules_install && make install

Couple of times Dracut failed to generate correct initramfs, resulting in froze. With a
hint from Haralad Hoyer on IRC, I generated the initramfs manually (usually, using the
host initrd should be sufficient):

$ dracut /boot/initramfs-3.11.0-rc1+.img 3.11.0-rc1+
$ depmod -a

Sure, I can certainly be a user here :-) . Note to self: Still have to debug/bisect an
offending Kernel commit which is causing some KVM unit test failures.

Re: Easiest making kernel rpms from upstream git

By Harald Hoyer at 08/29/2013 - 04:48

On 08/28/2013 08:31 PM, Kashyap Chamarthy wrote:
That should be:

$ depmod -a
$ dracut /boot/initramfs-3.11.0-rc1+.img 3.11.0-rc1+

Re: Easiest making kernel rpms from upstream git

By Igor Gnatenko at 08/28/2013 - 15:14

On Thu, 2013-08-29 at 00:01 +0530, Kashyap Chamarthy wrote: