From 58bbb0b550f6e27b9248343c697ab93bf79c97da Mon Sep 17 00:00:00 2001 From: morrownr Date: Wed, 28 Jun 2023 01:07:09 -0500 Subject: [PATCH] update to handle very low mem systems --- Makefile | 2 +- dkms-make.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4f930f6..8ddaf16 100644 --- a/Makefile +++ b/Makefile @@ -2536,7 +2536,7 @@ uninstall: sign: @openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Custom MOK/" @mokutil --import MOK.der - @$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der 8821cu.ko + @$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der 88x2bu.ko sign-install: all sign install diff --git a/dkms-make.sh b/dkms-make.sh index e24c191..09e73f7 100755 --- a/dkms-make.sh +++ b/dkms-make.sh @@ -1,5 +1,8 @@ #!/bin/sh +# Warning: Do not run this script in a terminal. It is designed to be +# run from another script. + # SMEM needs to be set here if dkms build is not initiated by install-driver.sh SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }') @@ -11,6 +14,9 @@ if [ "$sproc" -gt 1 ]; then if [ "$SMEM" -lt 1400000 ]; then sproc=2 fi + if [ "$SMEM" -lt 700000 ]; then + sproc=1 + fi fi kernelver=${kernelver:-$(uname -r)}