I assume you know how to make a pet. Two methods to do it.
Method #1
1. Make sure you have devx and kernel headers installed.
2. Extract the files from the NVIDIA binary bundle:
Code: Select all
./NVIDIA-Linux-x86_64-195.36.15-pkg2.run --x
3. Cd to the extracted directory. In the following, all the directory names are relative to this extracted directory.
4. With the exception of a few shell scripts, you will need everything under usr/bin, usr/lib, usr/X11R6 (rename that usr/X11R6 to usr/X11R7), and /usr/share. If you need the header files (for devx etc), get usr/include as well
5. Go to usr/src and run
(you need devx and kernel headers installed to be able to do this)
6. Get the resulting compiled nvidia.ko into your pet as well (perhaps under lib/modules/2.6.28.10/kernel/drivers/video (or whatever your kernel version is).
7. Create a pinstall.sh that will execute "depmod -a" after installation is completed.
8. Use dir2pet to create the pet.
9. Done !
(Obviously, xorg.conf is not touched. There are many ways to get this xorg.conf updated - asking the user to run nvidia-xconfig, running nvidia-settings, or simply get a standard xorg.conf and change the driver from "vesa" or "nv" to "nvidia" and add this into the pet).
Method #2
1. Boot from pfix=ram, and create a fresh save file - make sure you have about 300MB free at least (more is better).
2. Configure to load devx and kernel headers. Don't configure everything else.
3. Reboot, and make sure that your gcc works and /usr/src is not empty,
4. Kill X (make sure X is not running and you're in linux console). Otherwise, you can also boot with pfix=nox.
5. Run the NVIDIA installer from the binary bundle
Code: Select all
./NVIDIA-Linux-x86_64-195.36.15-pkg2.run
. It will install the NVIDIA driver.
6. Test your installation by starting X
7. If it works, reboot and go into the system with pfix=ram.
8. Using rox, go into your fresh save file and double-click it (=open it).
9. Examine the files that have been added by the NVIDIA installer. The files would be similar to what you see in method #1 step 4. Copy all this files into some storage directory.
10. Look into /lib/modules/kernel-version/kernel/drivers/video and look for nvidia.ko there. (If it's not there, look around - it must be somewhere in your /lib/modules directory). Copy this file also into that storage directory.
11. Follow step 7 onwards of method #1.
12. If you want, before you run dir2pet, you can also copy the etc/X11/xorg.conf you found in your savefile.
I personally tested Method #2, it works cleanly for me. I believe method #1 should work as well (the files I got from method #2 is a subset of the ones I found in method #1).
BTW - the title of this thread is to create a self-compiling nvidia pet. If you're thinking to create a pet that will work with all kernels, you can do so with method #1 by including the entire /usr/src instead of only the compiled nvidia.ko module. But I think it's rather pointless because for that to happen, you need to have devx and kernel-headers before you can install the pet (as the pet then needs to compile the module on demand).
Alternatively, if you have a lot of time, you can compile the nvidia module a few times on different kernels, and bundle them together into the pet. You can then write a pinstall.sh script which will choose and copy the correct version depending on which kernel is used.
Good luck.