summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-24 14:20:07 +0200
committerSimon Rettberg2024-05-24 14:20:07 +0200
commitfa4945748f6c1d55e1cd4d59acd2aedc95a12b0c (patch)
tree62f1872c9b5afeeb9da437b2e3ab7782e2dc2f64
parent[lightdm-greeter-bwlp/xorg] Fix https git URLs (diff)
downloadmltk-fa4945748f6c1d55e1cd4d59acd2aedc95a12b0c.tar.gz
mltk-fa4945748f6c1d55e1cd4d59acd2aedc95a12b0c.tar.xz
mltk-fa4945748f6c1d55e1cd4d59acd2aedc95a12b0c.zip
[vmware17] Try next-lower prepatched kmod version from github
-rw-r--r--core/modules/vmware17/module.build14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/modules/vmware17/module.build b/core/modules/vmware17/module.build
index bbc0a971..5934c0df 100644
--- a/core/modules/vmware17/module.build
+++ b/core/modules/vmware17/module.build
@@ -32,12 +32,10 @@ fetch_source() {
unlink "$VMWARE_BUNDLE_FILE"
VMWARE_BUNDLE_FILE="${VMWARE_BUNDLE_FILE%.tar}"
fi
-
- cd - >/dev/null
}
build() {
- local KMOD SHORT PATCH MIN_KERN MAX_KERN
+ local KMOD SHORT PATCH MIN_KERN MAX_KERN vers
[ -z "$VMWARE_BUNDLE_FILE" ] && VMWARE_BUNDLE_FILE=$(basename "$(find "${MODULE_WORK_DIR}/src" -iname "vmware-*" | head -n 1)")
local DELETE_FILES=$(for LINE in $REQUIRED_VMWARE_DELETIONS;do echo "rm -rf -- $LINE"; done)
@@ -53,8 +51,14 @@ build() {
cp "${MODULE_WORK_DIR}/src/$VMWARE_BUNDLE_FILE" "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
local KVER2=$TARGET_KERNEL_SHORT
[ ${#KVER2} -gt 4 ] && KVER2=${KVER2%.*}
- git clone --depth 1 -b "workstation-${OFFICIAL_VERSION}" "https://github.com/mkubecek/vmware-host-modules.git" "${MODULE_BUILD_DIR}/prepatched" \
- && pinfo "Have prepatched kernel modules"
+ # Try next-lower minor as fallback
+ for vers in "$OFFICIAL_VERSION" "${OFFICIAL_VERSION:0:-1}$(( ${OFFICIAL_VERSION:"-1"} - 1 ))"; do
+ git clone --depth 1 -b "workstation-${vers}" \
+ "https://github.com/mkubecek/vmware-host-modules.git" \
+ "${MODULE_BUILD_DIR}/prepatched" || continue
+ pinfo "Have prepatched kernel modules ($vers)"
+ break
+ done
if ! [ -d "${MODULE_BUILD_DIR}/prepatched" ]; then
# copy required patches
mkdir -p "${MODULE_BUILD_DIR}/patches"