Created
January 21, 2014 00:10
-
-
Save dlitz/8531948 to your computer and use it in GitHub Desktop.
VMware Workstation kernel module patches VMware Workstation 9.0.2 & Linux kernel 3.12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Inspired by the vmware-any-any-update series of patches | |
set -e | |
ws_ver=`vmware-installer -l | grep vmware-workstation | awk '{ print $2 }' | cut -d. -f1-3` | |
if [ -z "$ws_ver" ] ; then | |
echo >&2 "$0: error: VMware Workstation not installed?" | |
exit 1 | |
fi | |
tempdir=`mktemp -d` | |
cd "$tempdir" | |
wget http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmblock-9.0.2-5.0.2-3.12-3.11-3.10.patch | |
wget http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmblock-9.0.2-5.0.2-3.12-3.11.patch | |
wget http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmblock-9.0.2-5.0.2-3.12.patch | |
wget http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmnet-9.0.2-5.0.2-3.12-3.11-3.10.patch | |
sha256sum -c <<'EOF' | |
1ccda5b82b4543ee361800c01d0324b0de37fbe74278bde44f4f5b388ec81cae vmblock-9.0.2-5.0.2-3.12-3.11-3.10.patch | |
28923ccccf15e4543866e2165f747024b34be0f44622f75411764a536e1d2f43 vmblock-9.0.2-5.0.2-3.12-3.11.patch | |
7db7cf635b847bc9e882d2122f3af9fe982437cbbb7d1789f1e8221ec84c04f6 vmblock-9.0.2-5.0.2-3.12.patch | |
4ca16b7842655651c5314f5fe7cb788170425a3809e169c86d398d690d7cf740 vmnet-9.0.2-5.0.2-3.12-3.11-3.10.patch | |
EOF | |
if [ -f /usr/lib/vmware/modules/source/.patched ] ; then | |
echo >&2 "$0: error: already patched" | |
exit 1 | |
fi | |
cp -a /usr/lib/vmware/modules/source /usr/lib/vmware/modules/source-workstation"$ws_ver"-`date +%Y-%m-%d-%H:%M:%S-backup` | |
tar xf /usr/lib/vmware/modules/source/vmblock.tar | |
tar xf /usr/lib/vmware/modules/source/vmnet.tar | |
cd "$tempdir/vmblock-only" | |
patch -t -p1 < "$tempdir/vmblock-9.0.2-5.0.2-3.12-3.11-3.10.patch" | |
patch -t -p1 < "$tempdir/vmblock-9.0.2-5.0.2-3.12-3.11.patch" | |
patch -t -p1 < "$tempdir/vmblock-9.0.2-5.0.2-3.12.patch" | |
make -j8 | |
make clean | |
cd "$tempdir/vmnet-only" | |
patch -t -p1 < "$tempdir/vmnet-9.0.2-5.0.2-3.12-3.11-3.10.patch" | |
make -j8 | |
make clean | |
cd "$tempdir" | |
touch /usr/lib/vmware/modules/source/.patched | |
tar cf /usr/lib/vmware/modules/source/vmblock.tar vmblock-only | |
tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only | |
echo "Done" | |
# Now build it all properly | |
vmware-modconfig --console --install-all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment