mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-11-18 19:44:48 +00:00
low mem systems
This commit is contained in:
parent
3c0c745e37
commit
0437a35fc5
@ -1,7 +1,7 @@
|
||||
PACKAGE_NAME="rtl8821cu"
|
||||
PACKAGE_VERSION="5.12.0.4"
|
||||
MAKE[0]="'make' -j$(nproc) KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
|
||||
CLEAN="'make' clean"
|
||||
BUILT_MODULE_NAME[0]="8821cu"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
|
||||
AUTOINSTALL="yes"
|
||||
MAKE="'make' -j${SPROC}"
|
||||
CLEAN="'make' clean"
|
||||
DEST_MODULE_LOCATION[0]="/updates/dkms"
|
||||
AUTOINSTALL="YES"
|
||||
|
@ -16,18 +16,19 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
SCRIPT_NAME="install-driver.sh"
|
||||
SCRIPT_VERSION="20230109"
|
||||
SCRIPT_VERSION="20230111"
|
||||
MODULE_NAME="8821cu"
|
||||
DRV_VERSION="5.12.0.4"
|
||||
|
||||
KVER="$(uname -r)"
|
||||
KARCH="$(uname -m)"
|
||||
#KSRC="/lib/modules/${KVER}/build"
|
||||
KSRC="/lib/modules/${KVER}/build"
|
||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||
|
||||
DRV_NAME="rtl${MODULE_NAME}"
|
||||
DRV_DIR="$(pwd)"
|
||||
OPTIONS_FILE="${MODULE_NAME}.conf"
|
||||
SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }')
|
||||
|
||||
# check to ensure sudo was used
|
||||
if [[ $EUID -ne 0 ]]
|
||||
@ -120,13 +121,25 @@ echo ": ${SCRIPT_NAME} v${SCRIPT_VERSION}"
|
||||
# information that helps with bug reports
|
||||
|
||||
# display architecture
|
||||
echo ": ${KARCH}"
|
||||
echo ": ${KARCH} (ARCH)"
|
||||
|
||||
# display total memory in system
|
||||
#grep MemTotal /proc/meminfo
|
||||
# display total system memory
|
||||
echo ": ${SMEM} (SMEM)"
|
||||
|
||||
export SPROC=$(nproc)
|
||||
# Avoid OOM in low-RAM systems.
|
||||
if [ "$SPROC" -gt 1 ]
|
||||
then
|
||||
if [ "$SMEM" -lt 1400000 ]
|
||||
then
|
||||
SPROC=2
|
||||
fi
|
||||
fi
|
||||
# display total number of cpu cores / in use
|
||||
echo ": ${SPROC}/$(nproc) (SPROC)"
|
||||
|
||||
# display kernel version
|
||||
echo ": ${KVER}"
|
||||
echo ": ${KVER} (KVER)"
|
||||
|
||||
# display gcc version
|
||||
gcc_ver=$(gcc --version | grep -i gcc)
|
||||
|
Loading…
Reference in New Issue
Block a user