You are not logged in.

#1 2011-08-08 17:52:11

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

[solved] custom-kernel 3.0.1 conflicting with kernel26

I'm trying to install "my" standard-custom-kernel.

my customized PKGBUILD:

pkgbase=linux
#pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -ARCH kernel
pkgname=('linux-ATOM' 'linux-ATOM-headers' 'linux-ATOM-docs')       # Build kernel with a different name
_kernelname=${pkgname#linux}

and I've changed all the package-things to:

package_linux-ATOM

I've created a linux-ATOM.install with

KERNEL_NAME=-ATOM
KERNEL_VERSION=3.0-ATOM

in it.

Compile run went fine, but when I'd try to do

yaourt -U linux-ATOM-3.0.1-1-x86_64.pkg.tar.xz linux-ATOM-headers-3.0.1-1-x86_64.pkg.tar.xz linux-ATOM-docs-3.0.1-1-x86_64.pkg.tar.xz

pacman says:

:: linux-ATOM und linux stehen miteinander in Konflikt mit (kernel26)

are conflicting with kernel26.

what I'm doing wrong?

Last edited by itman (2011-08-09 20:41:37)

Offline

#2 2011-08-08 17:56:32

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

It is perfectly normal for a custom kernel to be in conflict with the vanilla kernel.

Offline

#3 2011-08-08 18:58:35

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

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

itman - your custom kernel should not provide kernel26.

Awebb - a correctly built custom kernel should not conflict with the Arch kernel package. In fact, the normal thing to do is to make sure your custom kernel does not conflict. This is well documented in the relevant wiki pages, and even a little bit in the linux (formerly kernel26) PKGBUILD.

Offline

#4 2011-08-08 19:12:03

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

thought so. What did I do wrong then?

PKGBUILD of the new 3.0.1-kernel has

provides=('kernel26')
conflicts=('kernel26')

in it.... that looks strange to me

Last edited by itman (2011-08-08 19:20:13)

Offline

#5 2011-08-08 19:22:38

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

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

No - that's not strange, because the official linux package is replacing the official kernel26 package. Your custom build, however, is not, and should therefore not provide or conflict with it.

Offline

#6 2011-08-08 20:16:44

verbbis
Member
Registered: 2009-09-02
Posts: 26

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

I have to agree that it is not "strange" in the sense of the word, but rather quite understandable. I commented out "provides", "conflicts" and "replaces" in my custom PKGBUILD and it seems to work. That said, I think the PKGBUILD and/or wiki should be updated to reflect the changes in linux-3.0 concerning kernel compilation using ABS.

I still have some problems booting to the custom kernel for some reason (similar to here), but that's another issue.

Last edited by verbbis (2011-08-08 20:20:41)

Offline

#7 2011-08-08 20:22:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

@op - see the PKGBUILD for linux-ck in the AUR and model yours after it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2011-08-09 05:11:20

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

@graysky followed your hint -> compile/install went fine. Now got hit by the dreaded major/minor thingie Will look into that later. Compiling linux-ck now :-)

Offline

#9 2011-08-09 06:16:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

itman wrote:

@graysky followed your hint -> compile/install went fine. Now got hit by the dreaded major/minor thingie Will look into that later. Compiling linux-ck now :-)

...remember that linux-ck has no ck patchsets nor any bfq patch sets currently.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2011-08-09 14:24:23

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

@graysky just had to see if "your" build install and boot ok. And that did it. Nothing of those major/minor things occurred.

So - I guess I'd made some mistakes somewhere... Will start over

Offline

#11 2011-08-09 17:02:58

verbbis
Member
Registered: 2009-09-02
Posts: 26

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

Did you manage to figure it out? At least in my case the problem was in erroneous ramdisk creation. Here are the steps I took to compile a custom kernel using ABS and the stock kernel PKGBUILD successfully:

1. Edit pkgname in PKGBUILD (as instructed here)
2. Change package_linux()-function (as instructed in the wiki)
3. Comment out 'provides', 'conflicts' and 'replaces' (to solve the original issue in this topic)
4. Create copies of linux.install and linux.preset for the custom kernel (makepkg will complain about these)
5. Fix mkinitcpio.d config logic between lines 122-125 in the PKGBUILD

It should be:

  sed \
    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|g" \
    -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"

In my opinion that could/should be done in the official PKGBUILD as well.

Last edited by verbbis (2011-08-09 17:07:38)

Offline

#12 2011-08-09 20:40:32

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

Well done - Sir!

Custom-kernel installed and up and running!

I nicked from graysky's linux-ck PKGBUILD this:

provides=("${pkgname}=${pkgver}")

and commented out the other two offending statements.

But your fix did the trick. How did you this figured out?

Offline

#13 2011-08-09 21:42:47

slytux
Member
From: New York
Registered: 2010-09-25
Posts: 129

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

Why is the third sed line missing from the Arch's linux PKGBUILD?  People are going to be at wits-end trying to make a renamed custom kernel because it fails at the depmod stage.  I'm still trying to figure out what it does exactly and seems to be adapted from previous kernel26.

kernel26:

sed -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \ 

Proposed linux:

sed -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|g" \ 

Offline

#14 2011-08-10 14:27:18

verbbis
Member
Registered: 2009-09-02
Posts: 26

Re: [solved] custom-kernel 3.0.1 conflicting with kernel26

Well I think it is missing because of a simple overlook from the package maintainer's part - and that the refactored PKGBUILD for linux-3.x has not been tested for custom kernel compilation (it works fine with the stock kernel). Ultimately, however, it is missing because none of us (myself included) have bothered to file a bug report smile.

The particular lines modify the mkinitcpio configuration presets for the kernel in question. Without the last line the ALL_kver variable contains a hard-coded value "/boot/vmlinuz-linux" thus referring to the stock kernel image. That is obviously incorrect in the case of a custom kernel.

Last edited by verbbis (2011-08-10 14:31:21)

Offline

Board footer

Powered by FluxBB