2006-07-28 15:17:09 +02:00
|
|
|
source $stdenv/setup
|
2006-07-28 14:49:12 +02:00
|
|
|
|
2006-07-28 15:17:09 +02:00
|
|
|
export MODULE_DIR=$out/lib/modules/
|
2006-07-28 14:49:12 +02:00
|
|
|
|
|
|
|
kernelVersion=$(cd $kernel/lib/modules/; ls -d *)
|
|
|
|
|
|
|
|
mkdir -p $out/lib/modules/$kernelVersion
|
|
|
|
|
|
|
|
cd $kernel
|
|
|
|
|
2006-07-28 15:29:33 +02:00
|
|
|
echo making kernel directories
|
2006-07-28 14:49:12 +02:00
|
|
|
|
|
|
|
find . -not -path "./lib/modules/$kernelVersion/build*" -type d | xargs -n 1 -i% mkdir -p $out/%
|
|
|
|
|
2006-07-28 15:29:33 +02:00
|
|
|
echo symlinking kernel modules
|
2006-07-28 14:49:12 +02:00
|
|
|
|
|
|
|
find . -not -path "./lib/modules/$kernelVersion/build*" -a -not -path \
|
|
|
|
"./System*" -a -not -path "./vmlinuz*" -type f | xargs -n 1 -i% \
|
2006-07-28 15:17:09 +02:00
|
|
|
ln -s $kernel/% $out/%
|
2006-07-28 14:49:12 +02:00
|
|
|
|
2006-07-28 15:29:33 +02:00
|
|
|
echo $modules
|
|
|
|
for i in $modules; do
|
|
|
|
echo making directories for $i
|
|
|
|
cd $i
|
|
|
|
find . -not -path "./lib/modules/$kernelVersion/build*" -type d | xargs -n 1 -i% mkdir -p $out/%
|
2006-07-28 14:49:12 +02:00
|
|
|
|
2006-07-28 15:29:33 +02:00
|
|
|
echo symlinking modules for $i
|
2006-07-28 14:49:12 +02:00
|
|
|
|
2006-07-28 15:29:33 +02:00
|
|
|
find . -not -path "./lib/modules/$kernelVersion/build*" -type f | xargs -n 1 -i% ln -s $i/% $out/%
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
echo running depmod
|
2006-07-28 15:17:09 +02:00
|
|
|
$module_init_tools/sbin/depmod -ae $kernelVersion
|