You are not logged in.

#1 2006-09-13 21:12:02

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

custom kernel compilation with abs..

Been trying out custom kernel compilation with abs, since i only know the regular make menuconfig style, thought that this would be a good thing to learn.

here is my kernel pkgbuild (showing only the part that i changed):

# Contributor: dibblethewrecker <dibblethewrecker>
pkgname=kernel26
pkgver=2.6.17.13
pkgrel=1
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support), built with ... patchset"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### if you are using a single patch from a patchset you can add the name, without it's extention, below
patch=2.6.18-rc6-mm2
##### add the names of any patches to this section, ensure you have the correct extentions!
source=($patch.bz2 config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )

I want to install the 2.6.18-rc6-mm2, so i downloaded that patch and put it in the same folder as PKGBUILD.

I copied kernel26.install and put it in the same folder as the PKGBUILD.

when running makepkg it asks for a config file.. So i copied the config file in /var/abs/kernels/kernel26/. But this will build with an old config file.. how can i as when doing the manual way, do a make menuconfig and enter the settings i want for this kernel??

thanks


The ultimate Archlinux release name: "I am your father"

Offline

#2 2006-09-13 21:56:43

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: custom kernel compilation with abs..

Change "yes "" | make config" line to "make menuconfig", "make oldconfig" or whatelse.

Offline

#3 2006-09-14 07:35:08

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: custom kernel compilation with abs..

alright. I built the kernel and ran pacman -A  on it. I changed my grub menu to this:

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# general configuration:
timeout   5
default   0
color light-blue/black light-cyan/blue


# (0) Arch Linux
title  Arch Linux
root   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/sda3 ro vga=773
initrd /boot/kernel26.img

# (1) Arch Linux
 title  Arch Linux mm2 custom
 root   (hd0,2)
 kernel /boot/vmlinuz261713-ARCH root=/dev/sda3 ro vga=773
initrd /boot/kernel26.img


# (1) Arch Linux
title  Arch Linux ck patches
root   (hd0,2)
kernel /boot/vmlinuz26ck root=/dev/sda3 ro vga=773
initrd /boot/initrd26ck.img


# (1) Windows
title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1

But when running the custom kernel from grub, after 2 seconds i get:

"kinit not found"  message.. and it stops there.

any ideas? I am guessing that it might have something with the kernel26.img.. but not sure.


The ultimate Archlinux release name: "I am your father"

Offline

#4 2006-09-14 08:24:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: custom kernel compilation with abs..

I'd say it does too, and I think the problem is here:

jinn wrote:

I copied kernel26.install and put it in the same folder as the PKGBUILD.

Did you just copy the install script, or did you edit it to create an image with a unique name? The script is hardcoded to create an image called kernel26.img i.e. the image name required by the stock kernel, so if you ran it as it is, you have overwritten the images for your stock kernel with images for your new kernel.

You might still be able to boot your new kernel with kernel26-fallback.img, but if not you will have to boot your stock kernel using the initrd image, which will have been unaffected.

Once your system is running again, you need to regenerate the kernel26 images using mkinitcpio, and then you can start debugging the problem with your new kernel.

Of course, if you've already edited kernel26.install for your new kernel, ignore the above, and I'll start again. wink

Offline

#5 2006-09-14 09:56:44

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: custom kernel compilation with abs..

logged into my normal arch kernel, ran mkinitcpio -g /boot/kernel26.img -k 2.6.17.13-arch

rebooted and int worked just fine!

My other concern now is the nvidia drivers.. It seems i need to reinstall them for this kernel.. would it work with the nvidia from pacman?

thanks


The ultimate Archlinux release name: "I am your father"

Offline

#6 2006-09-14 10:13:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: custom kernel compilation with abs..

No. The nvidia packages in the repos are for the stock and beyond kernels only.. You need to download the PKGBUILD and any other build files, change the pkgname to something like nvidia-custom, change the _kernver variable to match your kernel, and rebuild.

Offline

#7 2006-09-14 20:56:49

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: custom kernel compilation with abs..

thanks tomk!

just one more thing, cant i just copy over the nvidia module to my new kernel from my old? feels like to should work..


The ultimate Archlinux release name: "I am your father"

Offline

#8 2006-09-15 21:24:55

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: custom kernel compilation with abs..

No, they will not work. Follow tomk's advice, it is really simple.


Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB