- Timestamp:
- Nov 17, 2011 10:25:36 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r39321 r39358 164 164 vboxguest-scripts_INST = $(INST_ADDITIONS)src/ 165 165 vboxguest-scripts_MODE = a+rx,u+w 166 vboxguest-scripts_SOURCES = $(vboxguest-sh_0_OUTDIR)/do_dkms \166 vboxguest-scripts_SOURCES = ../../../HostDrivers/linux/do_dkms \ 167 167 ../../../HostDrivers/linux/build_in_tmp 168 vboxguest-scripts_CLEAN = $(vboxguest-sh_0_OUTDIR)/do_dkms169 168 170 169 $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \ … … 178 177 --output $@ $< 179 178 180 $$(vboxguest-sh_0_OUTDIR)/do_dkms: \181 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_dkms \182 $(VBOX_VERSION_STAMP) \183 | $$(dir $$@)184 $(call MSG_TOOL,Creating,,$@)185 $(QUIET)$(SED) \186 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \187 -e "s;_MODULE_;vboxguest;g" \188 -e "s;_OLDMODULES_;vboxguest vboxadd vboxsf vboxvfs vboxvideo;g" \189 --output $@ $<190 $(QUIET)$(CHMOD) a+rx,u+w $@191 192 179 # scripts. 193 180 INSTALLS += vboxguest-sh -
trunk/src/VBox/Additions/linux/Makefile.kmk
r39325 r39358 58 58 VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/ 59 59 VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC)) 60 VBOX_PATH_LNX_HOST_DRV := $(PATH_ROOT)/src/VBox/HostDrivers/linux/ 61 VBOX_REL_LNX_HOST_DRV := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_HOST_DRV)) 60 62 61 63 # Unset this to speed up things during makefile hacking. … … 339 341 $(VBOX_REL_LNX_ADD_INST)deffiles 340 342 LnxAdd-scripts_EXEC_SOURCES = \ 343 $(VBOX_REL_LNX_HOST_DRV)do_dkms \ 341 344 $(VBOX_REL_LNX_INST_SRC)routines.sh \ 342 345 $(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \ -
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r39348 r39358 29 29 ### END INIT INFO 30 30 31 . /var/lib/VBoxGuestAdditions/config32 export BUILD_TYPE33 export USERNAME34 35 31 PATH=$PATH:/bin:/sbin:/usr/sbin 36 32 PACKAGE=VBoxGuestAdditions 37 OLDMODULES="vboxguest vboxadd vboxsf vboxvfs vboxvideo"38 MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"39 BUILDINTMP="$MODULE_SRC/build_in_tmp"40 DODKMS="$MODULE_SRC/do_dkms"41 33 LOG="/var/log/vboxadd-install.log" 42 34 MODPROBE=/sbin/modprobe 35 OLDMODULES="vboxguest vboxadd vboxsf vboxvfs vboxvideo" 43 36 44 37 if $MODPROBE -c | grep -q '^allow_unsupported_modules *0'; then … … 168 161 fi 169 162 163 show_error() 164 { 165 if [ "$system" = "gentoo" ]; then 166 eerror $1 167 fi 168 fail_msg 169 echo "($1)" 170 } 171 172 fail() 173 { 174 show_error "$1" 175 exit 1 176 } 177 170 178 dev=/dev/vboxguest 171 179 userdev=/dev/vboxuser 180 config=/var/lib/VBoxGuestAdditions/config 172 181 owner=vboxadd 173 182 group=1 … … 199 208 printf "The missing package can be probably installed with\napt-get install linux-headers-$KERN_VER\n" 200 209 fi 201 }202 203 show_error()204 {205 if [ "$system" = "gentoo" ]; then206 eerror $1207 fi208 fail_msg209 echo "($1)"210 }211 212 fail()213 {214 show_error "$1"215 exit 1216 210 } 217 211 … … 355 349 { 356 350 begin "Removing existing VirtualBox DKMS kernel modules" 357 $DODKMS uninstall > $LOG351 $DODKMS uninstall $OLDMODULES > $LOG 358 352 succ_msg 359 353 begin "Removing existing VirtualBox non-DKMS kernel modules" … … 372 366 373 367 # Short cut out if a dkms build succeeds 374 if $DODKMS install >> $LOG 2>&1; then368 if $DODKMS install vboxguest $INSTALL_VER >> $LOG 2>&1; then 375 369 succ_msg 376 370 return 0 … … 483 477 setup() 484 478 { 479 if test -r $config; then 480 . $config 481 else 482 fail "Configuration file $config not found" 483 fi 484 test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || 485 fail "Configuration file $config not complete" 486 export BUILD_TYPE 487 export USERNAME 488 489 MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER" 490 BUILDINTMP="$MODULE_SRC/build_in_tmp" 491 DODKMS="$MODULE_SRC/do_dkms" 492 485 493 setup_modules 486 494 mod_succ="$?" … … 498 506 cleanup() 499 507 { 508 if test -r $config; then 509 . $config 510 test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || 511 fail "Configuration file $config not complete" 512 DODKMS="$INSTALL_DIR/src/vboxguest-$INSTALL_VER/do_dkms" 513 elif test -x ./do_dkms; then # Executing as part of the installer... 514 DODKMS=./do_dkms 515 else 516 fail "Configuration file $config not found" 517 fi 518 500 519 # Delete old versions of VBox modules. 501 520 cleanup_modules -
trunk/src/VBox/HostDrivers/Makefile.kmk
r39333 r39358 67 67 HostDrivers-scripts_INST = bin/src/ 68 68 HostDrivers-scripts_MODE = a+rx,u+w 69 HostDrivers-scripts_SOURCES = $(HostDrivers-scripts_0_OUTDIR)/do_dkms \69 HostDrivers-scripts_SOURCES = linux/do_dkms \ 70 70 linux/build_in_tmp 71 HostDrivers-scripts_CLEAN = $(HostDrivers-scripts_0_OUTDIR)/do_dkms72 71 73 72 INSTALLS += HostDrivers-dkms-src … … 89 88 --output $@ $< 90 89 91 $$(HostDrivers-scripts_0_OUTDIR)/do_dkms: \92 $(PATH_SUB_CURRENT)/linux/do_dkms \93 $(VBOX_VERSION_STAMP) \94 | $$(dir $$@)95 $(call MSG_TOOL,Creating,,$@)96 $(QUIET)$(SED) \97 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \98 -e "s;_MODULE_;vboxhost;g" \99 -e "s;_OLDMODULES_;vboxhost vboxdrv vboxnetflt vboxnetadp;g" \100 --output $@ $<101 $(QUIET)$(CHMOD) a+rx,u+w $@102 103 90 endif 104 91 -
trunk/src/VBox/HostDrivers/linux/do_dkms
r32183 r39358 15 15 # 16 16 17 ACTION= 18 if [ "$1" = "install" ]; then 19 ACTION="install" 20 MODULE="$2" 21 VERSION="$3" 22 elif [ "$1" = "uninstall" ]; then 23 shift 24 ACTION="uninstall" 25 OLDMODULES="$*" 26 break 27 fi 28 17 29 DKMS=`which dkms 2>/dev/null` 18 30 if [ -n "$DKMS" ] 19 31 then 20 if [ "$ 1" = "uninstall" ]; then32 if [ "$ACTION" = "uninstall" ]; then 21 33 22 34 echo "Uninstalling modules from DKMS" 23 for m in _OLDMODULES_35 for m in $OLDMODULES 24 36 do 25 37 $DKMS status -m $m | while read line … … 37 49 done 38 50 done 39 # there should not be any more matches40 status=`$DKMS status -m _MODULE_ -v _VERSION_`41 if echo $status | grep added > /dev/null ||42 echo $status | grep built > /dev/null ||43 echo $status | grep installed > /dev/null44 then45 $DKMS remove -m _MODULE_ -v _VERSION_ --all46 fi47 51 exit 0 48 52 49 elif [ "$ 1" = "install" ]; then53 elif [ "$ACTION" = "install" ]; then 50 54 51 55 echo "Attempting to install using DKMS" 52 if $DKMS add -m _MODULE_ -v _VERSION_&&53 $DKMS build -m _MODULE_ -v _VERSION_&&54 $DKMS install -m _MODULE_ -v _VERSION_--force56 if $DKMS add -m $MODULE -v $VERSION && 57 $DKMS build -m $MODULE -v $VERSION && 58 $DKMS install -m $MODULE -v $VERSION --force 55 59 then 56 60 exit 0 -
trunk/src/VBox/Installer/linux/Makefile.kmk
r39334 r39358 339 339 -e "s|%DEBIAN%||g" \ 340 340 -e "s|%PACKAGE%|virtualbox|g" \ 341 -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \ 341 342 --output $@ \ 342 343 $< … … 347 348 -e "s|%DEBIAN%||g" \ 348 349 -e "s|%PACKAGE%|virtualbox|g" \ 350 -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \ 349 351 -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \ 350 352 --output $@ \ -
trunk/src/VBox/Installer/linux/debian/rules
r39223 r39358 318 318 -e 's|%DEBIAN%|yes|g' \ 319 319 -e 's|%PACKAGE%|virtualbox|g' \ 320 -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \ 320 321 -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \ 321 322 $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init -
trunk/src/VBox/Installer/linux/rpm/rules
r39223 r39358 184 184 -e 's|%DEBIAN%||g' \ 185 185 -e 's|%PACKAGE%|virtualbox|g' \ 186 -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \ 186 187 -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \ 187 188 vboxdrv.sh.in > $(archdir)/vboxdrv.init -
trunk/src/VBox/Installer/linux/vboxdrv.sh.in
r39334 r39358 32 32 NOLSB=%NOLSB% 33 33 DEBIAN=%DEBIAN% 34 VERSION=%VERSION% 34 35 MODPROBE=/sbin/modprobe 35 36 … … 299 300 stop 300 301 begin_msg "Uninstalling old VirtualBox DKMS kernel modules" 301 $DODKMS uninstall > $LOG302 $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG 302 303 succ_msg 303 304 if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then … … 322 323 fi 323 324 begin_msg "Trying to register the VirtualBox kernel modules using DKMS" 324 if ! $DODKMS install >> $LOG; then325 if ! $DODKMS install vboxhost $VERSION >> $LOG; then 325 326 fail_msg "Failed, trying without DKMS" 326 327 begin_msg "Recompiling VirtualBox kernel modules"
Note:
See TracChangeset
for help on using the changeset viewer.