nixpkgs/pkgs/os-specific/linux/ov511/ov511-kernel.patch
Armijn Hemel f6e4235c6b 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
2006-01-03 15:49:54 +00:00

41 lines
1.1 KiB
Diff

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: