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

Re: sarge: kernel & gcc version confusion



On Fri, Jul 30, 2004 at 06:28:04AM -0700, cam wrote:
> Hello all,
> 
> I've just moved to debian in the last few days after several years of RH -
> usual reasons. Enjoying it very much so far. I installed woody with bf24 kernel
> from dl'd CD and just put on the most basic system. I used apt-get to install
> x, xfce, mozilla and a few other things.. I then decided to upgrade to sarge
> and did a dist-upgrade.
> 
> I now want to compile the nvidia drivers for my GeForce3 and have found it
> slightly confusing from here. Here are some questions:
> 
> - I installed gcc3.3 because this seemed to be appropriate for sarge from
> discussions I found on the net but I wasn't sure how to tell. Isn't it safer
> that I compile the driver with the same compiler that was used for X and the
> kernel? How do I find this out?
> 

AFAIK gcc 3.3 is the standard compiler for sid. Sarge should be either
3.2 or 3.3, but they should be compatible (there was an issue with java
plugin for mozilla where you needed the version compile with gcc 3.2 so
sarge should be 3.2+ according to that).

You could just do aptitude install gcc and see which version installs
by default, and that will work.

> - When I used aptitude to get gcc, it also installed a set of kernel headers.
> Why is this a dependency for the compiler?
> 

You need the kernel headers for system calls and some assembly stuff
and settings.

> - Not surprisingly, the nvidia installer wants me to download the kernel
> headers to match my system - why can't I find headers for the bf24 kernel that
> I used initially - presumably becasue I moved up to sarge?
> 

You can always add the stable sources to /etc/apt/sources.list along
side the sarge sources.

> - I assume it would be easier to just grab a new kernel, headers and everything
> and rebuild the kernel and then the nvidia driver. Is this likely to be
> problematic for other stuff on the system (e.g. X?)
> 

That won't be any problem with the system, as long as you stay with
kernel 2.4. If you upgrade to 2.6 everything will still work but you
will probably need to play around with the settings. If you go to 2.6
you will need to install the module-init-tools package since the module
format changed (it installs along side the 2.4 module files so you can
switch back and forth), and the mice are all mapped also to
/proc/input/mice, and each one is accessible in
/proc/input/mouse<n>. The old setting should still work if you have one
mouse, with more then one (mainly laptops with touchpads) it may take
some fiddling.

I would suggest either kernel 2.4.26 or 2.6.7.

> - Under aptitude there is a wide range of header packages available (not at my
> machine now so I can't remember them, sorry) for a given kernel - what is the
> difference between these? What is the minimum set to do what I want - some
> customisation of the kernel and building of other modules like nvidia?
> 

You should get the kernel headers for the kernel you have installed.

If you want to build your own kernel you need to get the kernel-source
package for the kernel version you want and kernel-package IIRC, don't
remember if any others.

You then enter the kernel source directory, configure (make xconfig or
make menuconfig) and use make-kpkg to build the kernel. I am not sure
how to build the initrd kernel like debian uses. I think with 

make-kpkg --revision <revision> --initrd kernel-image 

It looks like you may also need to use the --mkimage but I don't
know. I use the date in yyyymmdd format for the revision just so I can
remember which image is from when (the format is so it can be compared
according to which is more recent with >= )

To build a standard kernel you just run
make-kpkg --revision <revision> kernel-image

This gives you a debian package of the kernel. The easier way to start
is to install the kernel image and the kernel source, copy
/boot/config-<kernel version> to .config and then run configure to
start tweaking the configuration. Note that if you want to skip the
initrd, you will need to change the configuration to compile to module
for your root file system into the kernel and not as a module or the
kernel won't be able to reach your modules to load them. Most other
things can work either way.

> Any other advice, pointers etc gratefully received...

If you start compiling the kernels yourself, I suggest you skip the
vmlinuz and vmlinuz.old links lilo uses in / (if you are using lilo and
not grub) and just point to the kernels directly, this will allow for
more kernels at the same time, and always make sure you keep around a
working kernel installed so that you can log in to fix things if needed.

> c
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: