You are not logged in.

#1 2008-05-08 19:04:31

mmmasterluke
Member
Registered: 2007-12-07
Posts: 49

Custom kernel with makepkg (EXTRAVERSION and mkinitcpio)

Hello,

I've searched the forum and the web to find an answer to my question but now I'm stuck.

First part:

I've just compiled a custom kernel and installed it with makepkg. While doing so, I wondered about the naming conventions for kernels and the /lib/modules/xyz directory. I found this directive on http://www.digitalhermit.com/linux/Kern … PATCHLEVEL:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 22
EXTRAVERSION = -1
       

Note that there is an additional EXTRAVERSION field. To prevent overwriting any existing kernel modules on the system we will change this EXTRAVERSION to something unique. When the final installation steps are run, kernel module files will then get written to /lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$EXTRAVERSION.

From what I can see, the normal kernel26 package does not do this. It's on version 2.6.24.4 but the modules are stored in /lib/modules/2.6.24 (without ".4").

My custom kernel is version 2.6.24.7 and it's modules are stored in /lib/modules/2.6.24.7.

Is this the right approach for directory nomenclature? If I omitted the ".7", I wouldn't be able to boot the old kernel, right?

Second part:

I had to build another ramfs to make my custom kernel boot. I now have a kernel26-my.img in addition to the original kernel26.img. I'd like to include this step into the makepkg procedure too so everything can be cleanly installed in one go. Is this recommended?

Luke

Offline

#2 2008-05-08 20:26:51

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: Custom kernel with makepkg (EXTRAVERSION and mkinitcpio)

Just use the PKGBUILD from the standard arch kernel and change the CONFIG_LOCALVERSION in the config file to suit, it will solve your problems. As far as the modules/EXTRA_VERSION goes, Its so when you upgrade kernels you dont have to rebuild the Nvidia drivers/etc everytime (I do with my custom kernels anyway, but Im the only person using it not the entire userbase).

Offline

Board footer

Powered by FluxBB