Merge 2b24a0dc3b into 83db18e610
This commit is contained in:
commit
a5ad71ddd6
@ -22,5 +22,6 @@ if [ "$sproc" -gt 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kernelver=${kernelver:-$(uname -r)}
|
KVER="${KVER:-$(uname -r)}"
|
||||||
make "-j$sproc" "KVER=$kernelver" "KSRC=/lib/modules/$kernelver/build"
|
KSRC="/lib/modules/$KVER/build"
|
||||||
|
make "-j$sproc" "KVER=$KVER" "KSRC=$KSRC"
|
||||||
|
|||||||
@ -32,8 +32,9 @@ SCRIPT_VERSION="20230628"
|
|||||||
MODULE_NAME="88x2bu"
|
MODULE_NAME="88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
|
|
||||||
KARCH="$(uname -m)"
|
KARCH="${KARCH:-$(uname -m)}"
|
||||||
KVER="$(uname -r)"
|
KVER="${KVER:-$(uname -r)}"
|
||||||
|
KSRC="/lib/modules/$KVER/build"
|
||||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||||
|
|
||||||
DRV_NAME="rtl${MODULE_NAME}"
|
DRV_NAME="rtl${MODULE_NAME}"
|
||||||
@ -95,7 +96,7 @@ if ! command -v make >/dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check to see if the correct header files are installed
|
# check to see if the correct header files are installed
|
||||||
if [ ! -d "/lib/modules/$(uname -r)/build" ]; then
|
if [ ! -d "$KSRC" ]; then
|
||||||
echo "Your kernel header files aren't properly installed."
|
echo "Your kernel header files aren't properly installed."
|
||||||
echo "Please consult your distro documentation or user support forums."
|
echo "Please consult your distro documentation or user support forums."
|
||||||
echo "Once the header files are properly installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the header files are properly installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
@ -349,9 +350,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v /usr/bin/time >/dev/null 2>&1; then
|
if command -v /usr/bin/time >/dev/null 2>&1; then
|
||||||
/usr/bin/time -f "Compile time: %U seconds" dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
/usr/bin/time -f "Compile time: %U seconds" dkms build -m ${DRV_NAME} -v ${DRV_VERSION} -k "$KVER" --kernelsourcedir "$KSRC"
|
||||||
else
|
else
|
||||||
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
dkms build -m ${DRV_NAME} -v ${DRV_VERSION} -k "$KVER" --kernelsourcedir "$KSRC"
|
||||||
fi
|
fi
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
@ -367,7 +368,7 @@ else
|
|||||||
echo ": ---------------------------"
|
echo ": ---------------------------"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
|
dkms install -m ${DRV_NAME} -v ${DRV_VERSION} -k "$KVER" --kernelsourcedir "$KSRC"
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
if [ "$RESULT" != "0" ]; then
|
if [ "$RESULT" != "0" ]; then
|
||||||
|
|||||||
@ -32,8 +32,9 @@ SCRIPT_VERSION="20230226"
|
|||||||
MODULE_NAME="88x2bu"
|
MODULE_NAME="88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
|
|
||||||
KARCH="$(uname -m)"
|
KARCH="${KARCH:-$(uname -m)}"
|
||||||
KVER="$(uname -r)"
|
KVER="${KVER:-$(uname -r)}"
|
||||||
|
KSRC="/lib/modules/$KVER/build"
|
||||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||||
|
|
||||||
DRV_NAME="rtl${MODULE_NAME}"
|
DRV_NAME="rtl${MODULE_NAME}"
|
||||||
@ -109,7 +110,7 @@ fi
|
|||||||
if command -v dkms >/dev/null 2>&1; then
|
if command -v dkms >/dev/null 2>&1; then
|
||||||
echo "Removing a dkms installation."
|
echo "Removing a dkms installation."
|
||||||
# 2>/dev/null suppresses the output of dkms
|
# 2>/dev/null suppresses the output of dkms
|
||||||
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all 2>/dev/null
|
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} -k "$KVER" --kernelsourcedir "$KSRC" --all 2>/dev/null
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
#echo "Result=${RESULT}"
|
#echo "Result=${RESULT}"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user