You are not logged in.

#1 2008-01-14 03:22:05

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

[solved]first custom kernel; problems with nvidia

I've decided I'd try slimming down my kernel removing all the crap I'll never need, so I figured I'd do it the right way.  I've followed the following two wiki articles and I've got no problem booting into the new kernel, but the nvidia module I build against this kernel fails to load X.  The error I receive is "NVIDIA(0): Failed to initialize the NVIDIA graphics device!".  To ensure I didn't remove anything that would cause this, I rebuilt the kernel using the default -ARCH kernel, only changing the name and removing the boot images.  Still no dice with nvidia.  I have successfully built the ipw3945 module against this kernel.

The wiki articles I've followed are
http://wiki.archlinux.org/index.php/Cus … n_with_ABS
and
http://wiki.archlinux.org/index.php/NVI … tom_kernel

nvidia pkgbuild

# $Id: PKGBUILD,v 1.82 2007/11/26 16:24:19 tpowa Exp $
# Maintainer : Thomas Baechler <thomas@archlinux.org>

pkgname=nvidia-taco
pkgver=100.14.19
_kernver='2.6.23-TACO'
pkgrel=6
pkgdesc="NVIDIA drivers for kernel26."
arch=('i686' 'x86_64')
[ "$CARCH" = "i686"   ] && ARCH=x86
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.nvidia.com/"
depends=('kernel26-TACO' 'nvidia-utils')
conflicts=('nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy')
license=('custom')
install=nvidia.install
source=(http://us.download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run)
md5sums=('4426931324a7bcbda5fdea4c4d60a292')
[ "$CARCH" = "x86_64" ] && md5sums=('8587dce4fedcba87cc0639dedfc0360b')

build()
{
  # Extract
  cd $startdir/src/
  sh NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run --extract-only
  cd NVIDIA-Linux-$ARCH-${pkgver}-pkg0
  
  # Any extra patches are applied in here...

  cd usr/src/nv/
  ln -s Makefile.kbuild Makefile
  make SYSSRC=/lib/modules/${_kernver}/build module 
  
  # install kernel module
  mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
  install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/

  sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
}

nvidia.install

# arg 1:  the new package version
post_install() {
  KERNEL_VERSION='2.6.23-TACO'
  depmod -v $KERNEL_VERSION  > /dev/null 2>&1         
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  post_install $1
  rmmod nvidia || echo 'In order to use the new nvidia module, exit Xserver and unload it manually.'
}

# arg 1:  the old package version
post_remove() {
  KERNEL_VERSION='2.6.23-TACO'
  depmod -v $KERNEL_VERSION     > /dev/null 2>&1     
}

op=$1
shift
$op $*

any insight?

ps. lets see if cactus finds this one wink


EDIT: after my sixth or so kernel/nvidia build, dmesg _finally_ gave me the hint i needed.  api mismatch between my hardware and the nvidia module.  i'm not sure why dmesg never showed errors before, only "nvidia module loaded".  anyway changing the pkgver in the pkgbuild fixed my problem. time to start slimming it down now.

Last edited by rson451 (2008-01-16 05:54:54)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

Board footer

Powered by FluxBB