1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

add ov511 kernel driver. This is for testing purposes. What we do is we build

the module and install it under $out/lib/modules/$kernelversion/ ...

Eventually we will make tons of symlinks from /lib/modules/$kernelversion
to this location, so we can safely run tools like depmod and friends.
I believe this is the least ugly hack to make it work.

svn path=/nixpkgs/trunk/; revision=4486
This commit is contained in:
Armijn Hemel 2006-01-03 15:49:54 +00:00
parent c476c825cb
commit f6e4235c6b
4 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,18 @@
source $stdenv/setup
hashname=$(basename $kernel)
echo $hashname
if echo "$hashname" | grep -q '^[a-z0-9]\{32\}-'; then
hashname=$(echo "$hashname" | cut -c -32)
fi
stripHash $kernel
version=$(echo $strippedName | cut -c 7-)-$hashname
echo "version $version"
export version
ensureDir $out/lib/modules/$version/kernel/drivers/usb/media/
genericBuild

View file

@ -0,0 +1,12 @@
{stdenv, fetchurl, kernel}:
stdenv.mkDerivation {
name = "ov511-2.30";
builder = ./builder.sh;
src = fetchurl {
url = http://alpha.dyndns.org/ov511/download/2.xx/distros/ov511-2.30.tar.bz2;
md5 = "9eacf9e54f2f54a59ddbf14221a53f2a";
};
patches = [./ov511-kernel.patch];
inherit kernel;
}

View file

@ -0,0 +1,40 @@
diff -ruN ov511-2.30/do_install.sh ov511-2.30.new/do_install.sh
--- ov511-2.30/do_install.sh 2003-11-12 09:24:29.000000000 +0100
+++ ov511-2.30.new/do_install.sh 2006-01-03 16:34:44.000000000 +0100
@@ -6,10 +6,10 @@
exit 1
fi
-UNAME=`uname -r`
+UNAME=$version
-INSTALL_PATH_2_4=/lib/modules/$UNAME/kernel/drivers/usb/
-INSTALL_PATH_2_6=/lib/modules/$UNAME/kernel/drivers/usb/media/
+INSTALL_PATH_2_4=$out/lib/modules/$UNAME/kernel/drivers/usb/
+INSTALL_PATH_2_6=$out/lib/modules/$UNAME/kernel/drivers/usb/media/
MAJMIN=`echo $UNAME | cut -d . -f 1-2`
@@ -35,7 +35,7 @@
install $MODULE $INSTALL_PATH
done
-echo Finding module dependencies
-/sbin/depmod -ae
+#echo Finding module dependencies
+#/sbin/depmod -ae
echo All done!
diff -ruN ov511-2.30/Makefile ov511-2.30.new/Makefile
--- ov511-2.30/Makefile 2005-10-12 11:19:27.000000000 +0200
+++ ov511-2.30.new/Makefile 2006-01-03 16:02:41.000000000 +0100
@@ -112,7 +112,8 @@
else # We were called from command line
-KDIR := /lib/modules/$(shell uname -r)/build
+#KDIR := /lib/modules/$(shell uname -r)/build
+KDIR := $(kernel)/lib/modules/$(version)/build
PWD := $(shell pwd)
default:

View file

@ -1558,6 +1558,10 @@ rec {
inherit stdenv mingetty shadowutils;
};
ov511 = (import ../os-specific/linux/ov511) {
inherit stdenv fetchurl kernel;
};
pam = (import ../os-specific/linux/pam) {
inherit stdenv fetchurl cracklib;
};