Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/dkms-make.sh
1306 views
1
#!/bin/sh
2
3
# Warning: Do not run this script in a terminal. It is designed to be
4
# run from another script.
5
6
# SMEM needs to be set here if dkms build is not initiated by install-driver.sh
7
SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }')
8
9
# sproc needs to be set here if dkms build is not initiated by install-driver.sh
10
sproc=$(nproc)
11
12
# avoid Out of Memory condition in low-RAM systems by limiting core usage
13
if [ "$sproc" -gt 1 ]; then
14
if [ "$SMEM" -lt 1400000 ]; then
15
sproc=2
16
fi
17
if [ "$SMEM" -lt 700000 ]; then
18
sproc=1
19
fi
20
fi
21
22
kernelver=${kernelver:-$(uname -r)}
23
make "-j$sproc" "KVER=$kernelver" "KSRC=/lib/modules/$kernelver/build"
24
25