mirror of
https://github.com/aleksamagicka/aquacomputer_d5next-hwmon.git
synced 2025-07-23 04:03:00 +02:00
* Update Makefile Add additional targets for building dkms module and integrating existing targets. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Add DKMS Support Adds DKMS support and adds two useful utilities to automate installation and removal of the dkms module. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Add DKMS Documentation. Adds installation instructions for the DKMS Module. All previous targets such as "make checkpath" and "make dev" are supported. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Update Makefile Update formatting Signed-off-by: Daniel Clark <megadjc@gmail.com> --------- Signed-off-by: Daniel Clark <megadjc@gmail.com>
26 lines
811 B
Bash
26 lines
811 B
Bash
#!/bin/bash
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-install.sh\"" 2>&1
|
|
exit 1
|
|
else
|
|
echo "About to run dkms install steps..."
|
|
fi
|
|
|
|
DRV_NAME="$(basename "$(pwd)" | sed 's/-hwmon$//')"
|
|
echo $DRV_NAME
|
|
|
|
#default is branch name plus dkms modifier
|
|
DRV_VERSION="$(git rev-parse --abbrev-ref HEAD)-dkms.$(date -u -d "$(git show -s --format=%ci HEAD)" +%Y%m%d)"
|
|
#use below for tagged versioning. Should we add tagged version tracking?
|
|
#DRV_VERSION=$(git describe --long).$(date -u -d "$(git show -s --format=%ci HEAD)" +%Y%m%d)
|
|
echo $DRV_VERSION
|
|
DKMS_DIR=/usr/src/${DRV_NAME}-${DRV_VERSION}
|
|
echo $DKMS_DIR
|
|
|
|
make -f Makefile DRIVER=$DRV_NAME DRIVER_VERSION=$DRV_VERSION DKMS_ROOT_PATH=$DKMS_DIR dkms
|
|
|
|
echo "Finished running dkms install steps."
|
|
|
|
exit $RESULT
|