On Thursday, April 14, 2011 20:20:21 Allen Weiner wrote:
> On Thu, 2011-03-24 at 21:00 -0400, Chris Knadle wrote:
> > On Thursday, March 24, 2011 13:44:31 Allen Weiner wrote:
> > > For the one case of DKMS that I'm familiar with, kernel source is not
> > > needed. When running Fedora on a PC with an nvidia-based graphics card,
> > > I use the nvidia driver from the third-party repository RPMFusion. A
> > > problem with this is that a new driver is needed every time there is a
> > > kernel update, and the new driver is often not available in the
> > > repository for several days after the kernel update is released. The
> > > nvidia HowTo on Fedoraforum provides a DKMS-based solution for this.
> > > When a kernel update is released, DKMS is used to immediately compile a
> > > new nvidia driver. I use this approach. Kernel source is not required.
> > 
> > Hmm.  The last time I used DKMS it was for the Nvidia drivers, and it
> > *did* require the kernel source in order to compile the nvidia-kernel
> > part of the driver.  If I didn't have the kernel source installed (and
> > decompressed) then the DMKS build of the nvidia-kernel module failed. 
> > Likewise when I build the nvidia-kernel module without DKMS I'm pretty
> > sure it uses several kernel .o objects during the build.
> > 
> > Perhaps the Fedora Nvidia DKMS package comes with pre-packaged kernel .o
> > files in order to accomplish this without the kernel sources?  Otherwise
> > I'm not quite sure how this works.
> > 
> >   -- Chris
> 
> F14 yesterday shipped a kernel update. With this thread in mind, I
> noticed that when I get a kernel update, I also get a kernel-devel. I
> also recently noticed while browsing through /usr, that although I never
> explicitly downloaded the latest kernel source, my /usr had about 34 MB
> of source for the latest kernel. (I did explicitly download the Fedora
> SRPM for kernel 2.6.34. When uncompressed it is about 360 MB). So maybe
> the DKMS scheme I'm using downloads just enough of the kernel source
> needed to compile the nvidia driver.

If you look closer, you're probably going to find that it's the majority of 
the code for the Linux kernel, just without the documentation.  i.e. at least 
code-wise it's probably "the entire kernel"; at least that's what I've seen 
ready to get installed when my system tries to install dkms-based packages.

This is also why I find dkms annoying -- because when it's doing it's work, 
it's building the driver and the dependent portion of the kernel as root.  
That's typically how people start building the Linux kernel to begin with, but 
there have occasionally been some serious problems when doing that, so it's 
not recommended.

The other problem with dkms is that I build my own kernel from the "vanilla" 
kernel.org kernels, grabbed via Git, and I have my own area in my home 
directory where I build these kernels as a normal user.  Dkms normally depends 
on Linux kernel sources from the distribution repository, which it then wants 
to build Linux as root in /usr/src/ somewhere.  Making a softlink in /usr/src/ 
also doesn't fix this, because then it's messing with the kernel in my home 
directory as root.  So the only sane solution is to "have a little argument" 
with the package manager, keep the dkms-based packages out of the system, 
install the new external driver sources, then build a new kernel, THEN upgrade 
the GLX and other packages that depend on having a newer nvidia-kernel package 
installed.

In other words, building Linux + nvidia drivers from source means doing nvidia 
driver upgrades in stages.  DKMS does this all at once, which is nice, but 
then has the other problems I've mentioned above.

  -- Chris

--

Chris Knadle
[email protected]
_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug

Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium
  May 4 - Inkscape
  Jun 1 - Zimbra
  Jul 6 - Jul 2011

Reply via email to