[NCLUG] Fedora 6 and the RaLink rt2500 wireless card
Bob Proulx
bob at proulx.com
Sun Dec 10 19:54:43 MST 2006
Chad Perrin wrote:
> I recall installing ndiswrapper from deb-src repository sources,
I have not used nor heardof deb-src previously and so perhaps after
installing deb-src it automatically recompiles installed source
packages. I don't know. I don't see a 'deb-src' package in Debian at
this time. Perhaps you mean apt-src? I have heard other people
mention apt-src before but I just have not had time to play with it.
> grabbed with "apt-get source -b" and installed via APT, that
'apt-get source -b' downloads the source at that moment and builds it
at that moment.
> upgraded along with the rest of the installed packages when I ran an
> "apt-get upgrade" later on.
It would certainly be possible for apt-src to add hooks to make that
work. I will have to try it!
> I'm not certain whether this works in concert with kernel upgrades,
> since I've not really tried that, but it does work when there's a
> new minor version release, security patch, or bugfix available in
> the deb-src repositories for what I've installed from source in that
> manner.
Certainly without apt-src installed there is no automatic compilation
of source packages.
> From what you've said, it sounds like you're talking about needing to
> recompile when you install from source outside of the APT system, which
> is to me at least pretty much a tautology. It's also not really
> relevant to what I said, if that's what you meant. Did I misunderstand
> you?
You misunderstood. Let's take the example of the nvidia driver. Here
are the steps, in a simplified form. And I am not going to test these
at this moment so there may be typos.
Using the Debian source packages
export KVER=$(uname -r)
if [ -d /usr/src/kernel-headers-$KVER ]; then
# simplied source headers installed
export KSRC=/usr/src/kernel-headers-$KVER
else
sudo apt-get install linux-source-$KVER
export KSRC=/usr/src/linux-src-$KVER
fi
sudo apt-get install nvidia-kernel-source nvidia-glx-src
Build the kernel modules
cd /usr/src
tar xzf nvidia-kernel-source.tar.gz # /usr/src/modules/...
tar xjf linux-source-$KVER.tar.bz2
cd linux-source-$KVER
cp /boot/config-$KVER .config
make-kpkg clean
fakeroot make-kpkg --append_to_version +1-amd64-smp modules_image
# kernel_image builds the kernel, modules_image builds the modules
cd /usr/src
sudo dpkg -i nvidia-kernel-$KVER.deb
Build the graphics drivers
cd /usr/src/nvidia-glx-X.Y.ZZZZ
fakeroot dpkg-buildpackage -us -uc
cd /usr/src
sudo dpkg -i nvidia-glx.deb
See /usr/share/doc/nvidia-kernel-source/README.Debian for more details.
This will leave your system with these packages installed.
ii linux-image-2.6.19-1+1-amd64-smp 1.1 Linux kernel binary image for version 2.6.19-1+1-amd64-smp.
ii nvidia-glx 1.0.9631-1 NVIDIA binary XFree86 4.x driver
ii nvidia-kernel-2.6.19-1+1-amd64-smp 1.0.9631-1+1.1 NVIDIA binary kernel module for Linux 2.6.19-1+1-amd64-smp
ii nvidia-kernel-common 1.0.9631-1 NVIDIA binary kernel module common files
At this point let's assume that a security update is posted for the
kernel. I can install it with 'apt-get upgrade'. But the nvidia
driver will not be automatically rebuilt. The linux-source would be
automatically installed. But I would need to unpack the new source
and 'make-kpkg modules_image' and install the package in order to get
the matching driver built and installed.
Again, a lot of people mention module-assistant (aka m-a) but I prefer
the above process. By using this process I install these packges on
almost a thousand machines at work. That is why I prefer this while
people installing on exactly one machine may be preferring m-a. YMMV.
The version numbers in the above are for example use only. Do not
scale this drawing. Void* where prohibited. Char* elsewhere.
Etcetera, etcetera.
Bob
More information about the NCLUG
mailing list