[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HOWTO:rebuild the Debian kernel + nvidia



Hugo Vanwoerkom wrote:
Hi,

To use the proprietary nvidia driver with the latest Debian kernel in Sid you'll run into troubles.

There are two ways around it:

1. Use the Debian kernel and change modpost + the nvidia driver, as documented here:
http://grizach.servebeer.com/nvpatch/index.php

2. Change the Debian kernel and use any nvidia driver you desire.
   This method is documented here:
http://kernel-handbook.alioth.debian.org/
and the section in question is 4.2 Rebuilding an official Debian kernel package. However, it omits to tell you some things. Here's what I ran into:

2a. Now where are you getting the kernel source? You could install the Debian linux-source-2.6. But that will download a monolith of 50MB, on my dialup hours of waiting. An alternative is to use the version patches from http://www.kernel.org/. I did that and since 2.6.9 installed each patch on my HDD, so installing the source is trivial: install all of 2.6.9 and each patch version thereafter.

2b. Now what version are you to install? Based on Joey Hess's explanation on this list on 4/27/7 the Debian diff. file *contains* 2.6.20.7, so you have to install up to and including 2.6.20 and then apply http://ftp.debian.org/debian/pool/main/l/linux-2.6/linux-2.6_2.6.20-3.diff.gz that you have to download: cd into the tree of where you installed the kernel source and do: 'zcat (diff.gz file)| patch -p1'
That will install all the Debian stuff.

2c. The handbook tells you to 'fakeroot debian/rules debian/build debian/stamps' but that will get a 'permissions denied' error because 'rules' is not executable: change the permissions and make it executable.

2d. The handbook also tells you to 'apt-get build-dep linux-2.6'. I did that and it got me into untold difficulties with bugs 419020 419184 420056 421679. 419020 shows you that to solve the jadetex error also install livetex-full. On my dialup this took a day and a half.

2e. I wanted to change the following in the Debian kernel: turn *off* CONFIG_PARAVIRT, turn *on* CONFIG_PREEMPT, change the timer frequency to 1000Hz, turn *on* the Linux Logo and turn *on* kernel timings. Because I only wanted to build the i386 K7 kernel I changed debian/config and debian/arch/386/config *before* I ran the compile. I think that is the difficult way of doing it and easier would be to follow the handbook after 'It is possible to apply extra patches...' and do those steps and run 'make menuconfig' instead and change whatever you want the easy way.

2f. Then I did 'fakeroot make -f debian/rules.gen binary-arch-i386-none-k7' That applies all patches and compiles the kernel, which takes more than an hour on my 2GH Athlon. But it fails the 'abicheck' step. That refers to the 'application binary interface' and the ability of the kernel to house binaries from elsewhere. So *before you start* disable abicheck by changing debian/bin/abicheck.py: put ‘return 0’ on line 19 after ‘ret = 0’.

That will generate the linux-image and linux-headers debs. Install them and you're off and running.


It's a wiki: http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage

Hugo



Reply to: