WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Nvidia legacy drivers  (Read 7281 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Nvidia legacy drivers
« on: February 09, 2012, 12:51:12 PM »
I am currently making an extension for legacy nvidia cards, ver. 96.43.20 dated 2011.08.17 for TC3.x.
Here is a link to see if your video card is on the list:
http://www.nvidia.com/object/IO_32667.html
The driver for my MX 400, glxgears, and the nvidia setup applet are all working.
The nvidia package wants to put nvidia.ko in /lib/modules/KERNEL-tinycore/kernel/drivers/video.
I converted nvidia.ko to nvidia.ko.gz as I saw the other modules were in that format. My question is
whether that is the proper place to put that module.

      [EDIT]: Modified the link to point to a full list of legacy cards and which driver they require.
« Last Edit: February 10, 2012, 09:46:12 AM by Rich »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Nvidia legacy drivers
« Reply #1 on: February 09, 2012, 10:34:13 PM »
As I found that an interesting question I've done a bit of "poking around" (mostly in the BusyBox sources). It appears that 'depmod' is the critical tool here as it rebuilds the "modules.{alias,dep,symbols}" files in "/lib/modules/$(uname -r)" when 'tce-load' installs an extension that contains a '/usr/local/lib/modules' directory.

Now looking at the '*-KERNEL.tcz' extensions it appears that for 4.x only the two "OSS-KERNEL.tcz" files are not using '/usr/local/lib/modules' (those two go straight for '/lib/modules' instead). Either way due to the symbolic link "kernel.tclocal" the '/usr/local/lib/modules' are to be found "inside" of '/lib/modules'. This is critical as 'depmod' searches for files with ".ko" in their name "under" '/lib/modules'.

My hunch was that file and directory names for the kernel modules are not "carved in stone", and that any "sane" choice should work. To prove my assumption I've booted TC with boot code 'rdinit=/bin/sh' which means that '/init' (with all it's further processing) was not executed. Pretty much the only thing I did was (after a mount -a to have at least '/proc' and '/sys') that I renamed in my first test the directory in which 'e1000.ko.gz' is to be found. As expected any modprobe e1000 failed until I had rebuild the "modules.*" files (e.g. by running depmod). Likewise if I renamed 'e1000.ko.gz' to 'whatever.ko.gz' (and rebuild the "modules.*" files again) I now needed modprobe whatever for the 'e1000' module to load successfully.

Therefore I'd say you have a bit of freedom in which directory you put the file and what name it's got. Considering that the "nvidia-module-KERNEL.tcz" extensions each contain a single file (i.e. "/usr/local/lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko.gz") it might make most sense to use the same name. This suggestion is based on the assumption that no user should attempt to install "nvidia-module-KERNEL.tcz" at the same time as this new extension (for old cards).

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #2 on: February 10, 2012, 09:35:12 AM »
Hi maro
As always, your explanation is insightful and thorough. I also just found a thread on that topic under
TCE News->Kernel module extensions, that also recommends using /usr/local/lib/modules/......
which I have done. Aside from separating everything into separate packages, I need a naming
convention that won't cause collisions between package names, maybe:
nvidia-96.43.20-doc.tcz
nvidia-96.43.20-glx-dev.tcz
nvidia-96.43.20-glx.tcz
nvidia-96.43.20-module-2.6.33.3-tinycore.tcz
nvidia-96.43.20-settings.tcz
After I get this sorted out and submitted, I'll look into making a version for Tinycore 4.x.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #3 on: February 11, 2012, 10:01:41 PM »
I think I've run into a snag and would appreciate a ruling from one of the administrators. The license file states:
Quote
1.  DEFINITIONS

1.1  Customer.  Customer means the entity or individual that
downloads the SOFTWARE.

2.  GRANT OF LICENSE

2.1  Rights and Limitations of Grant.  NVIDIA hereby grants Customer
the following non-exclusive, non-transferable right to use the
SOFTWARE, with the following limitations:

2.1.1  Rights.  Customer may install and use one copy of the SOFTWARE
on a single computer, and except for making one back-up copy of
the Software, may not otherwise copy the SOFTWARE.  This LICENSE
of SOFTWARE may not be shared or used concurrently on different
computers.

2.1.2  Linux/FreeBSD Exception.  Notwithstanding the foregoing terms
of Section 2.1.1, SOFTWARE designed exclusively for use on the Linux or
FreeBSD operating systems, or other operating systems derived from the
source code to these operating systems, may be copied and redistributed,
provided that the binary files thereof are not modified in any way
(except for unzipping of compressed files).

2.1.3  Limitations.

No Reverse Engineering.  Customer may not reverse engineer,
decompile, or disassemble the SOFTWARE, nor attempt in any other
manner to obtain the source code.

No Separation of Components.  The SOFTWARE is licensed as a
single product.  Its component parts may not be separated for use
on more than one computer, nor otherwise used separately from the
other parts.
The package from NVIDIA does some linking and possibly compiling. Does this mean I've modified the binaries
and can not submit them to the repository?
No separation of components sounds like I can't separate out the documentation, development files, etc.
There is a library that interferes with the proper operation of the package. The way I read it, deleting it is
not an issue.
Gathering up the files it installed and packaging them doesn't sound like it's an issue either.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Nvidia legacy drivers
« Reply #4 on: February 12, 2012, 12:51:59 AM »
Quote
The package from NVIDIA does some linking and possibly compiling. Does this mean I've modified the binaries
and can not submit them to the repository?

You haven't modified the binaries, and it's ok to submit. It's a GPL source for the kernel module that gets built.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #5 on: February 12, 2012, 09:53:02 AM »
Hi curaga
Thanks.
Quote
No separation of components sounds like I can't separate out the documentation, development files, etc.
There is a library that interferes with the proper operation of the package. The way I read it, deleting it is
not an issue.
Gathering up the files it installed and packaging them doesn't sound like it's an issue either.
Are my other three assumptions correct?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Nvidia legacy drivers
« Reply #6 on: February 12, 2012, 10:04:57 AM »
Yes, they sound ok to me.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #7 on: February 12, 2012, 10:26:41 AM »
Hi curaga
Thanks for your guidance.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #8 on: February 12, 2012, 10:40:50 AM »
Hi curaga
Last question hopefully. Should I include the package I downloaded from NVIDIA as the source when submitting
the extension? Their package contains mostly pre-compiled binaries, libraries, and scripts for linking to the
installed kernel.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Nvidia legacy drivers
« Reply #9 on: February 12, 2012, 11:32:43 AM »
It appears Arslan did that, so I suppose yes.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Nvidia legacy drivers
« Reply #10 on: March 02, 2012, 09:38:23 PM »
Nvidia video drivers for legacy cards are now in the TC3 and TC4 repositories. The Info tab in AppBrowser lists
all cards and their PCI IDs that are supported by this extension. The extension is called  nvidia-96.43.20.