VirtualBox

Changeset 87376 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Jan 22, 2021 7:22:03 PM (4 years ago)
Author:
vboxsync
Message:

USB/Darwin: Capture USB devices directly through IOUSBLib, no longer use VBoxUSB.kext (see bugref:9808).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/darwin/loadusb.sh

    r82968 r87376  
    6868fi
    6969
    70 set -e
    71 
    72 # Copy the .kext to the symbols directory and tweak the kextload options.
    73 if test -n "$VBOX_DARWIN_SYMS"; then
    74     echo "${SCRIPT_NAME}.sh: copying the extension the symbol area..."
    75     rm -Rf "$VBOX_DARWIN_SYMS/$DRVNAME"
    76     mkdir -p "$VBOX_DARWIN_SYMS"
    77     cp -R "$DIR" "$VBOX_DARWIN_SYMS/"
    78     OPTS="$OPTS -s $VBOX_DARWIN_SYMS/ "
    79     sync
    80 fi
    81 
    82 # On smbfs, this might succeed just fine but make no actual changes,
    83 # so we might have to temporarily copy the driver to a local directory.
    84 if sudo chown -R root:wheel "$DIR" "$DEP_DIR"; then
    85     OWNER=`/usr/bin/stat -f "%u" "$DIR"`
    86 else
    87     OWNER=1000
    88 fi
    89 if test "$OWNER" -ne 0; then
    90     TMP_DIR=/tmp/${SCRIPT_NAME}.tmp
    91     echo "${SCRIPT_NAME}.sh: chown didn't work on $DIR, using temp location $TMP_DIR/$DRVNAME"
    92 
    93     # clean up first (no sudo rm)
    94     if test -e "$TMP_DIR"; then
    95         sudo chown -R `whoami` "$TMP_DIR"
    96         rm -Rf "$TMP_DIR"
    97     fi
    98 
    99     # make a copy and switch over DIR
    100     mkdir -p "$TMP_DIR/"
    101     sudo cp -Rp "$DIR" "$TMP_DIR/"
    102     DIR="$TMP_DIR/$DRVNAME"
    103 
    104     # load.sh puts it here.
    105     DEP_DIR="/tmp/loaddrv.tmp/$DEP_DRVNAME"
    106 
    107     # retry
    108     sudo chown -R root:wheel "$DIR" "$DEP_DIR"
    109 fi
    110 
    111 sudo chmod -R o-rwx "$DIR"
    112 sync
    113 if [ "$XNU_VERSION" -ge "10" ]; then
    114     echo "${SCRIPT_NAME}.sh: loading $DIR... (kextutil $OPTS -d \"$DEP_DIR\" \"$DIR\")"
    115     sudo kextutil $OPTS -d "$DEP_DIR" "$DIR"
    116 else
    117     echo "${SCRIPT_NAME}.sh: loading $DIR... (kextload $OPTS -d \"$DEP_DIR\" \"$DIR\")"
    118     sudo kextload $OPTS -d "$DEP_DIR" "$DIR"
    119 fi
    120 sync
    121 sudo chown -R `whoami` "$DIR" "$DEP_DIR"
    122 kextstat | grep org.virtualbox.kext
    123 
     70# We are now done since VBoxUSB.kext is no longer used.
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