Removed all root ownership stuff, so that the kernel modules will install in a chroot environment

svn path=/nixpkgs/trunk/; revision=20103
This commit is contained in:
Sander van der Burg 2010-02-18 14:04:22 +00:00
parent 50a513f515
commit 3b65d90edf

View File

@ -54,9 +54,16 @@ stdenv.mkDerivation {
# Install kernel module # Install kernel module
cd src cd src
kernelVersion=$(cd ${kernel}/lib/modules; ls) kernelVersion=$(cd ${kernel}/lib/modules; ls)
ensureDir $out/lib/modules/$kernelVersion/misc
export MODULE_DIR=$out/lib/modules/$kernelVersion/misc export MODULE_DIR=$out/lib/modules/$kernelVersion/misc
ensureDir $MODULE_DIR
# Remove root ownership stuff, since this does not work in a chroot environment
for i in `find . -name Makefile`
do
sed -i -e "s|-o root||g" \
-e "s|-g root||g" $i
done
# Install kernel modules
make install make install
# Create wrapper script # Create wrapper script