VirtualBox

Changeset 7004 in vbox


Ignore:
Timestamp:
Feb 18, 2008 7:34:18 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28205
Message:

Installer/Linux: added support for DKMS to the all distributions Linux installer (the main one, not the additions)

Location:
trunk/src/VBox/HostDrivers/Support
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r6845 r7004  
    4343SYSMODS.os2     += VBoxDrv
    4444SYSMODS.solaris += vboxdrv
     45OTHERS.linux    += \
     46        $(PATH_BIN)/src/build_in_tmp \
     47        $(if $(VBOX_OSE),,$(PATH_BIN)/src/dkms.conf)
    4548endif
    4649
     
    6467vboxmod-sh_MODE     = a+rx,u+w
    6568vboxmod-sh_SOURCES  = $(subst ",,$(FILES_VBOXDRV_BIN)) #"
     69
     70# Scripts needed for building the kernel modules
     71
     72$(PATH_BIN)/src/build_in_tmp: \
     73                Support/linux/build_in_tmp
     74        $(call MSG_TOOL,Creating,,$@)
     75        $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
     76        $(QUIET)chmod 0755 $@
     77
     78$(PATH_BIN)/src/dkms.conf: \
     79                Support/linux/dkms.conf
     80        $(call MSG_TOOL,Creating,,$@)
     81        $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
    6682
    6783#
  • trunk/src/VBox/HostDrivers/Support/linux/build_in_tmp

    r5999 r7004  
    2424# terms and conditions of either the GPL or the CDDL or both.
    2525#
     26
     27# Attempt to build using DKMS first
     28DKMS=`which dkms`
     29if [ -n "$DKMS" ]
     30then
     31    echo "Attempting to install using DKMS"
     32    status=`$DKMS status -m vboxdrv -v _VERSION_`
     33    if echo $status | grep added > /dev/null ||
     34        echo $status | grep built > /dev/null ||
     35        echo $status | grep installed > /dev/null
     36    then
     37        $DKMS remove -m vboxdrv -v _VERSION_ --all
     38    fi
     39    if $DKMS add -m vboxdrv -v _VERSION_ &&
     40        $DKMS build -m vboxdrv -v _VERSION_ &&
     41        $DKMS install -m vboxdrv -v _VERSION_ --force
     42    then
     43        exit 0
     44    fi
     45    echo "Failed to install using DKMS, attempting to install without"
     46fi
    2647
    2748# find a unique temp directory
  • trunk/src/VBox/HostDrivers/Support/linux/export_modules

    r5999 r7004  
    3939VBOX_VERSION_MINOR=`sed -e "s/^ *VBOX_VERSION_MINOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Config.kmk`
    4040VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Config.kmk`
     41VBOX_VERSION_STRING=$VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
    4142
    4243. $PATH_VBOXDRV/linux/files_vboxdrv
     
    5253echo "#define VBOX_VERSION_MINOR $VBOX_VERSION_MINOR" >> $PATH_TMP/version-generated.h
    5354echo "#define VBOX_VERSION_BUILD $VBOX_VERSION_BUILD" >> $PATH_TMP/version-generated.h
    54 echo "#define VBOX_VERSION_STRING \"$VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD\"" >> $PATH_TMP/version-generated.h
     55echo "#define VBOX_VERSION_STRING \"$VBOX_VERSION_STRING\"" >> $PATH_TMP/version-generated.h
    5556echo "" >> $PATH_TMP/version-generated.h
    5657echo "#endif" >> $PATH_TMP/version-generated.h
     
    6465    install -D -m 0755 `echo $f|cut -d'=' -f1` "$PATH_TMP/vboxdrv/`echo $f|cut -d'>' -f2`"
    6566done
     67sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_VBOXDRV/linux/build_in_tmp > $PATH_TMP/vboxdrv/build_in_tmp
     68chmod 0755 $PATH_TMP/vboxdrv/build_in_tmp
     69sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_VBOXDRV/linux/dkms.conf > $PATH_TMP/vboxdrv/dkms.conf
    6670
    6771# Only temporary, omit from archive
  • trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv

    r6530 r7004  
    101101
    102102FILES_VBOXDRV_BIN=" \
    103     ${PATH_ROOT}/src/VBox/HostDrivers/Support/linux/build_in_tmp=>build_in_tmp \
    104103"
Note: See TracChangeset for help on using the changeset viewer.

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