VirtualBox

Changeset 61206 in vbox


Ignore:
Timestamp:
May 26, 2016 10:12:37 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107495
Message:

bugref:8062: Linux installers: drop DKMS support: only build for the current kernel after all on installation and start-up. Build for new kernels as soon as they are installed, and old ones on reboot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r61199 r61206  
    307307    # don't stop the old modules here -- they might be in use
    308308    test -z "${QUICKSETUP}" && cleanup_modules
     309    # This does not work for 2.4 series kernels.  How sad.
     310    test -n "${QUICKSETUP}" && test -f "${MODULE_DIR}/vboxguest.ko" && return 0
    309311    begin "Building the VirtualBox Guest Additions kernel modules"
    310312
    311313    begin "Building the main Guest Additions module"
    312     for i in /lib/modules/*; do
    313         test -d "${i}/build" || continue
    314         # This does not work for 2.4 series kernels.  How sad.
    315         test -n "${QUICKSETUP}" && test -f "${i}/misc/vboxguest.ko" && continue
    316         begin "Building for kernel ${i##*/}" console
    317         export KERN_DIR="${i}/build"
    318         export MODULE_DIR="${i}/misc"
    319         if ! $BUILDINTMP \
    320             --save-module-symvers /tmp/vboxguest-Module.symvers \
    321             --module-source $MODULE_SRC/vboxguest \
    322             --no-print-directory install >> $LOG 2>&1; then
    323             show_error "Look at $LOG to find out what went wrong"
    324             test "${i##*/}" = "`uname -r`" && return 1
    325         fi
    326         succ_msg
    327         begin "Building the shared folder support module"
    328         if ! $BUILDINTMP \
    329             --use-module-symvers /tmp/vboxguest-Module.symvers \
    330             --module-source $MODULE_SRC/vboxsf \
    331             --no-print-directory install >> $LOG 2>&1; then
    332             show_error  "Look at $LOG to find out what went wrong"
    333             test "${i##*/}" = "`uname -r`" && return 1
    334         fi
    335         succ_msg
    336         begin "Building the graphics driver module"
    337         if ! $BUILDINTMP \
    338             --use-module-symvers /tmp/vboxguest-Module.symvers \
    339             --module-source $MODULE_SRC/vboxvideo \
    340             --no-print-directory install >> $LOG 2>&1; then
    341             show_error "Look at $LOG to find out what went wrong"
    342         fi
    343         succ_msg
    344         depmod "${i##*/}"
    345     done
     314    if ! $BUILDINTMP \
     315        --save-module-symvers /tmp/vboxguest-Module.symvers \
     316        --module-source $MODULE_SRC/vboxguest \
     317        --no-print-directory install >> $LOG 2>&1; then
     318        show_error "Look at $LOG to find out what went wrong"
     319        return 1
     320    fi
     321    succ_msg
     322    begin "Building the shared folder support module"
     323    if ! $BUILDINTMP \
     324        --use-module-symvers /tmp/vboxguest-Module.symvers \
     325        --module-source $MODULE_SRC/vboxsf \
     326        --no-print-directory install >> $LOG 2>&1; then
     327        show_error  "Look at $LOG to find out what went wrong"
     328        return 1
     329    fi
     330    succ_msg
     331    begin "Building the graphics driver module"
     332    if ! $BUILDINTMP \
     333        --use-module-symvers /tmp/vboxguest-Module.symvers \
     334        --module-source $MODULE_SRC/vboxvideo \
     335        --no-print-directory install >> $LOG 2>&1; then
     336        show_error "Look at $LOG to find out what went wrong"
     337    fi
     338    succ_msg
     339    depmod
    346340    return 0
    347341}
     
    400394    cat << EOF > /etc/kernel/postinst.d/vboxadd
    401395#!/bin/sh
     396test -d "/lib/modules/\${1}/build" || exit 0
     397KERN_DIR="/lib/modules/\${1}/build" MODULE_DIR="/lib/modules/\${1}/misc" \
    402398/sbin/rcvboxadd quicksetup
    403399exit 0
     
    453449        show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed."
    454450    fi
    455     test -z "${QUICKSETUP}" && extra_setup
     451    test -n "${QUICKSETUP}" && return "${mod_succ}"
     452    extra_setup
    456453    if [ "$mod_succ" -eq "0" ]; then
    457454        if running_vboxguest || running_vboxadd; then
     
    518515quicksetup)
    519516    QUICKSETUP=yes
    520     setup && start
     517    setup
    521518    ;;
    522519cleanup)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette