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