-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust dkms configuration to support building datagpu against nvidia …
…drivers
- Loading branch information
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
while test $# -gt 0; do | ||
case $1 in | ||
-v) | ||
VERSION="$2" | ||
shift 2; | ||
;; | ||
-s) | ||
SRCTREE="$2" | ||
shift 2; | ||
;; | ||
*) | ||
echo "USAGE: $0 -s src_tree -v kver" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ $EUID -ne 0 ]; then | ||
echo "This script must be run as root!" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$VERSION" ] || [ -z "$SRCTREE" ]; then | ||
echo "USAGE: $0 -s src_tree -v kver" | ||
exit 1 | ||
fi | ||
|
||
# Determine the NVIDIA module version installed for this kernel | ||
NVIDIA_VER=$(dkms status nvidia -k $VERSION | tr '/' '-' | awk -F, '{ print $1 }') | ||
|
||
# Generate a local Makefile that contains the configuration | ||
echo "NVIDIA_DRIVERS=$SRCTREE/$NVIDIA_VER" > Makefile.local | ||
|
||
echo "--> Building NVIDIA drivers version $NVIDIA_VER" | ||
|
||
make -C "$SRCTREE/$NVIDIA_VER" -j$(nproc) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
MAKE="make" | ||
PRE_BUILD="./build-nvidia.sh -s $source_tree -v $kernelver" | ||
CLEAN="make clean" | ||
MAKE="make" | ||
BUILT_MODULE_NAME=datagpu | ||
BUILT_MODULE_LOCATION=. | ||
DEST_MODULE_LOCATION="/updates" | ||
DEST_MODULE_LOCATION="/kernel/modules/misc" | ||
PACKAGE_NAME=datagpu-dkms | ||
REMAKE_INITRD=no | ||
AUTOINSTALL="yes" | ||
BUILD_DEPENDS="nvidia" | ||
NO_WEAK_MODULES="yes" | ||
#PACKAGE_VERSION= |