PDA

View Full Version : RH 7.3: make drivers work!


gnur00tic
10-19-02, 03:46 AM
This is the stuff I had to do when I upgraded my kernel from the one shipped with RedHat 7.3 (2.4.18-x), to a customly compiled 2.4.19.

Ok, I was just done installing RH7.3, and decided to download the GLX and kernel files on the nvidia driver page. I downloaded the right ones for my setup (NVIDIA_GLX-1.0-3123.i386.rpm) and (NVIDIA_kernel-1.0-3123.rh73up.i686.rpm).
This worked fine doing excactly what was said in the README found on the download page.

When I compiled a new kernel however, nothing worked.:confused: After some messing around, I found that the only thing I had to do, was to keep my previously-installed above files, and in addition download the NVIDIA_kernel-1.0-3123.tar.gz

In my download dir (from (virtual)console), I did a " tar -xzf NVIDIA_kernel-1.0-3123.tar.gz ", cd'ed to the subdirectory created by tar, and did a " make " there. If the output of make says something about " include /something/something " from your current, new kernel's libfolder(s), you're on the right track! ;)

If no errors occured, do a " make install " now.

Note: I never removed the kernel-file-RPM for my old kernel, as it was required by the GLX package. It doesn't weigh more than a meg anyways... :D

gnur00tic
10-19-02, 04:16 AM
Did I forget to mention that after you've done the tar - related stuff above, you need to type " su " and enter the root password.

This is really only needed for the "make install" (I think), but do the "make" as root aswell, doesn't hurt (that much).. =)

bwkaz
10-19-02, 09:03 AM
With the NVIDIA_kernel package, make does the same thing as make install does.

So for this package, you do need to be root to make. But for almost anything else, it's really not all that great of an idea. Using the make command as root can be bad if you don't trust whoever packaged what you're installing. Make can do just about anything, including trying to add usernames to /etc/passwd to give others login privileges, changing permissions on critical files, and other things that you don't really want it to be doing.

Of course, make install can do the same thing (since make is still running that), which is why personally, I install stuff as a normal user as well. But that takes quite a bit of messing around with directory permissions, probably not what you really want to do.

gnur00tic
10-20-02, 04:57 AM
Originally posted by bwkaz
With the NVIDIA_kernel package, make does the same thing as make install does.

So for this package, you do need to be root to make. But for almost anything else, it's really not all that great of an idea. Using the make command as root can be bad if you don't trust whoever packaged what you're installing. Make can do just about anything, including trying to add usernames to /etc/passwd to give others login privileges, changing permissions on critical files, and other things that you don't really want it to be doing.

Of course, make install can do the same thing (since make is still running that), which is why personally, I install stuff as a normal user as well. But that takes quite a bit of messing around with directory permissions, probably not what you really want to do.

no, I'm very sorry but you're wrong. This is perhaps a fact with the newest nvidia-kernel sourcefile, as I have not tried any of the former versions myself.

I guess this could easily be a distribution issue aswell..

This is the last lines of the output of "make" in RH7.3;
------
size NVdriver
text data bss dec hex filename
895298 55508 52396 1003202 f4ec2 NVdriver
Please run "make install" as root.
------

bwkaz
10-20-02, 08:23 AM
You are talking about the 3123 kernel .tar.gz, right? That is what I have... and this is an excerpt from that Makefile.

This all: target is the first target in the Makefile, which means it's the one that gets built when you just run make:

all: install

install: package-install

package-install: NVdriver
@if [ `id -ur` != 0 ]; then \
echo Please run \"make install\" as root.; \
else \
if [ -d $(BROKENDIR) ]; then \
rm -f $(BROKENDIR)/NVdriver; \
rmdir --ignore-fail-on-non-empty $(BROKENDIR); \
fi && \
mkdir -p $(INSTALLDIR) && \
$(INSTALL) -m 0664 NVdriver $(INSTALLDIR)/NVdriver$(O) && \
/sbin/depmod -a && \
/sbin/modprobe NVdriver && \
sh makedevices.sh && \
echo "NVdriver installed successfully."; \
fiSo you run make, it runs (the equivalent of) make install, which runs make package-install, which first runs make NVdriver (to build the NVdriver module itself), and then does the rest of what's under the package-install target; namely, copying it to /lib/modules/x.x.xx/kernel/drivers/video.

Oh, wait a minute, I think I see. The [ `id -ur` != 0 ] test there, is looking for if you're root. OK. It will automagically install itself if you just run make as root, but if you run make as a normal user (generally preferred, I don't know why I don't do it that way... maybe I just installed my first NVdriver before I got in that habit? possible, it's been a couple of years...), then you have to run make install as root. OK, that makes more sense.

You're very right, make isn't the same as make install, unless you're root.

gnur00tic
10-20-02, 08:59 AM
Yeah, we're both right in some sense then. You more than me, but that's to be expected. =)

I hope this thread will benefit someone caught in the FUD of pure RTFM'ing.. =)