You are not logged in.

#1 2008-06-23 15:11:14

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Custom kernel and nvidia module

I finally managed to boot my custom kernel
I took the 2.6.25.6 kernel and compiled many of the modules I used into the kernel.
boot entry:

title MyKernel
root  (hd0,5)
kernel /boot/vmlinuz-2.6.25-revision1 root=/dev/sda6 ro
initrd /boot/kernel26-revision1.img

However, X will not start because of the nvidia module. I reinstalled nvidia while booted off my kernel.
How do I install the nvidia module and other modules not originally part of the kernel?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#2 2008-06-23 17:34:56

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Custom kernel and nvidia module

This is what I use in /etc/rc.local

if ! modprobe nvidia ; then
    cd /root/nvidia && sh NVIDIA-Linux-x86_64-177.13-pkg2.run -a -q -s -N
    modprobe nvidia
fi

Offline

#3 2008-06-23 23:06:56

wavenator
Member
Registered: 2007-12-03
Posts: 62

Re: Custom kernel and nvidia module

go to the abs folder /var/abs/extra/nvidia
edit the PKGBUILD with you kernel name for example 2.6.5-ARCH
in the _kernel line
and compile it

good luck

Offline

#4 2008-06-24 02:03:39

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Custom kernel and nvidia module

[duncan@duncan-arch Desktop]$ makepkg -i
==> Making package: nvidia 173.14.05-4  (Mon Jun 23 21:58:42 EDT 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Downloading NVIDIA-Linux-x86_64-173.14.05-pkg0.run...
--2008-06-23 21:58:43--  http://us.download.nvidia.com/XFree86/Linux-x86_64/173.14.05/NVIDIA-Linux-x86_64-173.14.05-pkg0.run
Resolving us.download.nvidia.com... 96.6.120.33, 96.6.120.11
Connecting to us.download.nvidia.com|96.6.120.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12306564 (12M) [application/octet-stream]
Saving to: `NVIDIA-Linux-x86_64-173.14.05-pkg0.run'

100%[======================================>] 12,306,564  69.1K/s   in 2m 55s  

2008-06-23 22:01:38 (68.6 KB/s) - `NVIDIA-Linux-x86_64-173.14.05-pkg0.run' saved [12306564/12306564]

==> Validating source files with md5sums...
    NVIDIA-Linux-x86_64-173.14.05-pkg0.run ... Passed
==> Extracting Sources...
==> Entering fakeroot environment...
==> Starting build()...
Creating directory NVIDIA-Linux-x86_64-173.14.05-pkg0
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 173.14.05....................................................................................................................................
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1
==> ERROR: Build Failed.
    Aborting...
[duncan@duncan-arch Desktop]$

Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#5 2008-06-24 10:20:34

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Custom kernel and nvidia module

nvidia cannot find your kernel source to build it against. Ensure the symlink in /lib/modules/2.6.XX-XXX/build is correct, and you've modified _kernver in the PKGBUILD correctly.

Offline

#6 2008-06-24 16:02:14

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Custom kernel and nvidia module

The kernel sources I uses, as well as the config files are in my home directory. Do I need to move them, or link them?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#7 2008-06-25 00:15:18

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Custom kernel and nvidia module

How do I check the symlink?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#8 2008-06-29 11:18:04

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Custom kernel and nvidia module

Raccoon1400 wrote:

How do I check the symlink?

/lib/modules/{your_custom_kernel}/build should point to the kernel source.
_kernver in the nvidia PKGBUILD should be exactly the same as {your_custom_kernel}.

If you're still getting the error when the above checks out, make sure you are you using the full kernel source (some old Kernel PKGBUILDs floating around only copy over some of the source and, given the directory shuffling as of late, not necessarily the ones needed to get the nvidia binary up and running).
cheers,

Offline

#9 2008-07-07 00:06:37

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Custom kernel and nvidia module

How do I make /lib/modules/{your_custom_kernel}/build point to the source?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#10 2008-07-07 10:10:13

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Custom kernel and nvidia module

Raccoon1400 wrote:

How do I make /lib/modules/{your_custom_kernel}/build point to the source?

It should already, but to check it:

file /lib/modules/{your_custom_kernel}/build

If the link is incorrect, just delete it and make a proper one

ln -s /kernel/source/directory /lib/modules/{your_custom_kernel}/build

cheers,

Offline

Board footer

Powered by FluxBB