--- trunk/virtualbox/virtualbox-config.sh 2010/02/19 16:00:40 987 +++ trunk/virtualbox/virtualbox-config.sh 2010/02/21 20:06:45 988 @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /root/magellan-cvs/src/virtualbox/virtualbox-config.sh,v 1.11 2010-02-19 12:38:29 niro Exp $ +# $Header: /root/magellan-cvs/src/virtualbox/virtualbox-config.sh,v 1.12 2010-02-21 20:06:45 niro Exp $ # Configures virtualbox for Magellan-Linux LIBDIR=/usr/lib @@ -68,9 +68,9 @@ make -C ${KERNEL_SOURCES} SUBDIRS=$(pwd) SRCROOT=$(pwd) clean || die "mod-compile ${module}" # need some symver from vboxmodule (must be run after clean!) - if [[ ${module} = ${VBOXNETMODULE} ]] && [[ -f ../${VBOXMODULE/.ko/}/Module.symvers ]] + if [[ ${module} = ${VBOXNETMODULE} ]] || [[ ${module} = ${VBOXNETADPMODULE} ]] then - cp ../${VBOXMODULE/.ko/}/Module.symvers . + [[ -f ../${VBOXMODULE/.ko/}/Module.symvers ]] && cp ../${VBOXMODULE/.ko/}/Module.symvers . fi make -C ${KERNEL_SOURCES} SUBDIRS=$(pwd) SRCROOT=$(pwd) modules || die "mod-compile ${module}" @@ -82,7 +82,7 @@ # calc module dependencies mecho "Calculating module dependencies ..." -depmod -ae ${KERNEL_VERSION} +depmod -a ${KERNEL_VERSION} # re-read udev rules to grant the right permissions if [[ -x $(which udevadm) ]] @@ -99,6 +99,15 @@ mecho "Loading kernel-module ${module} ..." modprobe $(basename ${module} .ko) done + + if [ $(echo ${KERNEL_VERSION%%-*} | sed 's:\.::g') -ge 2631 ] + then + # fixes NMI warnings with kernels >=2.6.31: + # vboxdrv: Warning: 2.6.31+ kernel detected. Most likely the hardware performance + # vboxdrv: counter framework which can generate NMIs is active. + mecho "Disabled hardware performance counter NMIs ..." + echo 2 > /proc/sys/kernel/perf_counter_paranoid + fi else echo -e ${COLRED} echo "Your current running kernel does not match the the module target."