Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to build for custom kernel version & arch (v2) #123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions install-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ SCRIPT_VERSION="20230628"
MODULE_NAME="88x2bu"
DRV_VERSION="5.13.1"

KARCH="$(uname -m)"
KVER="$(uname -r)"
if [ -z "${KARCH+1}" ]; then
KARCH="$(uname -m)"
fi
if [ -z "${KVER+1}" ]; then
KVER="$(uname -r)"
fi
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"

DRV_NAME="rtl${MODULE_NAME}"
Expand Down Expand Up @@ -349,9 +353,9 @@ else
fi

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}/${KARCH}"
else
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
dkms build -m ${DRV_NAME} -v ${DRV_VERSION} -k "${KVER}/${KARCH}"
fi
RESULT=$?

Expand Down
8 changes: 6 additions & 2 deletions remove-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ SCRIPT_VERSION="20230226"
MODULE_NAME="88x2bu"
DRV_VERSION="5.13.1"

KARCH="$(uname -m)"
KVER="$(uname -r)"
if [ -z "${KARCH+1}" ]; then
KARCH="$(uname -m)"
fi
if [ -z "${KVER+1}" ]; then
KVER="$(uname -r)"
fi
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"

DRV_NAME="rtl${MODULE_NAME}"
Expand Down