summaryrefslogtreecommitdiff
path: root/libre/virtualbox-libre/vboxbuild
diff options
context:
space:
mode:
Diffstat (limited to 'libre/virtualbox-libre/vboxbuild')
-rw-r--r--libre/virtualbox-libre/vboxbuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/libre/virtualbox-libre/vboxbuild b/libre/virtualbox-libre/vboxbuild
index cfc3c0a66..e6fb94edd 100644
--- a/libre/virtualbox-libre/vboxbuild
+++ b/libre/virtualbox-libre/vboxbuild
@@ -32,11 +32,11 @@ fi
for kdir in /lib/modules/[2-3]*; do
if [[ ! -d $kdir/kernel ]]; then
# found a stale kernel
- mods=("$kdir/misc/vbox"{drv,netadp,netflt,pci}.ko*)
+ mods=("$kdir/extramodules"{drv,netadp,netflt,pci}.ko*)
if (( ${#mods[@]} )); then
stat_busy "Removing all old VirtualBox kernel modules"
if rm -f "${mods[@]}" &&
- rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null; then
+ rmdir -p --ignore-fail-on-non-empty "$kdir/extramodules" 2>/dev/null; then
stat_done
else
stat_fail
@@ -52,6 +52,7 @@ fi
for kernver; do
export KERN_DIR=/lib/modules/$kernver/build
+ export MODULE_DIR=/lib/modules/$kernver/extramodules
if [[ ! -d $KERN_DIR ]]; then
printf "error: \`%s' does not appear to be a valid kernel build directory.\n" \
"$KERN_DIR"
@@ -59,15 +60,22 @@ for kernver; do
fi
stat_busy "Recompiling VirtualBox kernel modules ($kernver)"
- for build in BUILDVBOX{DRV,NETFLT,NETADP,PCI}; do
+ if ! $BUILDVBOXDRV \
+ --save-module-symvers /tmp/vboxdrv-Module.symvers \
+ --no-print-directory install >> $LOG 2>&1; then
+ echo "Look at $LOG to find out what went wrong"
+ stat_fail
+ fi
+ for build in BUILDVBOX{NETFLT,NETADP,PCI}; do
if ! ${!build} \
- --save-module-symvers /tmp/vboxdrv-Module.symvers \
+ --use-module-symvers /tmp/vboxdrv-Module.symvers \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
stat_fail
- continue
fi
done
+ gzip -f9 "$MODULE_DIR"/*.ko
+ depmod "$kernver"
stat_done
done