VirtualBox

Changeset 82582 in vbox for trunk/src/VBox/HostDrivers/linux


Ignore:
Timestamp:
Dec 13, 2019 4:49:00 PM (5 years ago)
Author:
vboxsync
Message:

Additions/linux/export_modules.sh: adjust to use proper svn rev fallback
HostDrivers/linux/export_modules.sh: adjust to use proper svn rev fallback and use the setting from Config.kmk to decide whether vboxpci should be included or not

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/linux/export_modules.sh

    r78444 r82582  
    101101VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
    102102VBOX_VERSION_STRING=$VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
    103 VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`                                                                                                        VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`                                     VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`                         VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`                                   VBOX_C_YEAR=`date +%Y`
     103VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
     104VBOX_SVN_CONFIG_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
     105VBOX_SVN_VERSION_REV=`sed -e 's/^ *VBOX_SVN_REV_VERSION_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Version.kmk`
     106if [ "$VBOX_SVN_CONFIG_REV" -gt "$VBOX_SVN_VERSION_REV" ]; then
     107    VBOX_SVN_REV=$VBOX_SVN_CONFIG_REV
     108else
     109    VBOX_SVN_REV=$VBOX_SVN_VERSION_REV
     110fi
     111VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
     112VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
     113VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
     114VBOX_C_YEAR=`date +%Y`
     115VBOX_WITH_PCI_PASSTHROUGH=`sed -e "s/^ *VBOX_WITH_PCI_PASSTHROUGH *= *\(1\?\)/\1/;t;d" $PATH_ROOT/Config.kmk`
    104116
    105117. $PATH_VBOXDRV/linux/files_vboxdrv
    106118. $PATH_VBOXNET/linux/files_vboxnetflt
    107119. $PATH_VBOXADP/linux/files_vboxnetadp
    108 . $PATH_VBOXPCI/linux/files_vboxpci
     120if [ "$VBOX_WITH_PCI_PASSTHROUGH" -eq "1" ]; then
     121    . $PATH_VBOXPCI/linux/files_vboxpci
     122fi
    109123
    110124# Temporary path for creating the modules, will be removed later
     
    188202
    189203# vboxpci (VirtualBox host PCI access kernel module)
    190 mkdir $PATH_TMP/vboxpci || exit 1
    191 for f in $VBOX_VBOXPCI_SOURCES; do
    192     install -D -m 0644 `echo $f|cut -d'=' -f1` "$PATH_TMP/vboxpci/`echo $f|cut -d'>' -f2`"
    193 done
    194 if [ -n "$VBOX_WITH_HARDENING" ]; then
    195     cat                                   $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
    196 else
    197     sed -e "s;VBOX_WITH_HARDENING;;g" < $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
     204if [ "$VBOX_WITH_PCI_PASSTHROUGH" -eq "1" ]; then
     205    mkdir $PATH_TMP/vboxpci || exit 1
     206    for f in $VBOX_VBOXPCI_SOURCES; do
     207        install -D -m 0644 `echo $f|cut -d'=' -f1` "$PATH_TMP/vboxpci/`echo $f|cut -d'>' -f2`"
     208    done
     209    if [ -n "$VBOX_WITH_HARDENING" ]; then
     210        cat                                   $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
     211    else
     212        sed -e "s;VBOX_WITH_HARDENING;;g" < $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
     213    fi
    198214fi
    199215
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