summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modules/vmware12/module.build12
-rw-r--r--core/modules/vmware16/module.build13
2 files changed, 25 insertions, 0 deletions
diff --git a/core/modules/vmware12/module.build b/core/modules/vmware12/module.build
index 0df2f17e..555341a0 100644
--- a/core/modules/vmware12/module.build
+++ b/core/modules/vmware12/module.build
@@ -110,6 +110,18 @@ build() {
exit 0
EOF
chmod +x "${MODULE_BUILD_DIR}/bin/gccw"
+ # This is required as there are still some uname calls in the Makefiles, EVEN THOUGH
+ # YOU SPECIFY ANOTHER KERNEL via -k below. Building will fail for a 5.x kernel if you
+ # run on a system with a 4.x kernel.
+ cat > "${MODULE_BUILD_DIR}/usr/local/bin/uname" <<-EOF
+ #!/bin/sh
+ if [ "\$1" = "-r" ]; then
+ echo '${TARGET_KERNEL_LONG}'
+ else
+ /bin/uname "\$@" || /usr/bin/uname "\$@"
+ fi
+ EOF
+ chmod +x "${MODULE_BUILD_DIR}/usr/local/bin/uname"
chroot_run "${MODULE_BUILD_DIR}" <<-EOF
perror() {
echo "[ERROR ERROR] " "\$@" >&6
diff --git a/core/modules/vmware16/module.build b/core/modules/vmware16/module.build
index c85754ad..c6626de0 100644
--- a/core/modules/vmware16/module.build
+++ b/core/modules/vmware16/module.build
@@ -79,6 +79,19 @@ build() {
[ -z "${KERNEL_HEADERS_DIR}" -o ! -e "${KERNEL_HEADERS_DIR}" ] && perror "KERNEL_HEADERS_DIR ('"${KERNEL_HEADERS_DIR}"') not found. Was the kernel module built?"
# build in two steps, to be able to use mltk function while patching modules
+ mkdir -p "${MODULE_BUILD_DIR}/usr/local/bin"
+ # This is required as there are still some uname calls in the Makefiles, EVEN THOUGH
+ # YOU SPECIFY ANOTHER KERNEL via -k below. Building will fail for a 5.x kernel if you
+ # run on a system with a 4.x kernel.
+ cat > "${MODULE_BUILD_DIR}/usr/local/bin/uname" <<-EOF
+ #!/bin/sh
+ if [ "\$1" = "-r" ]; then
+ echo '${TARGET_KERNEL_LONG}'
+ else
+ /bin/uname "\$@" || /usr/bin/uname "\$@"
+ fi
+ EOF
+ chmod +x "${MODULE_BUILD_DIR}/usr/local/bin/uname"
pinfo "Installing vmware per chroot..."
chroot_run "${MODULE_BUILD_DIR}" <<-EOF
perror() {