summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2013-05-10 18:58:06 +0200
committerJonathan Bauer2013-05-10 18:58:06 +0200
commit9349f205cf1697d09444a0f7c36d5623950be03b (patch)
treec094c1748e8f42ef07a6e2b580c5288882bee004
parentworkaround: add symlink to old location or run-virt. TODO: adjust old openslx... (diff)
downloadtm-scripts-9349f205cf1697d09444a0f7c36d5623950be03b.tar.gz
tm-scripts-9349f205cf1697d09444a0f7c36d5623950be03b.tar.xz
tm-scripts-9349f205cf1697d09444a0f7c36d5623950be03b.zip
schöne funktion :)
-rw-r--r--remote/modules/vmplayer/vmplayer.build81
1 files changed, 69 insertions, 12 deletions
diff --git a/remote/modules/vmplayer/vmplayer.build b/remote/modules/vmplayer/vmplayer.build
index 46e4da8f..e228292d 100644
--- a/remote/modules/vmplayer/vmplayer.build
+++ b/remote/modules/vmplayer/vmplayer.build
@@ -27,19 +27,10 @@ build() {
ln -s /usr/lib/vmware/bin/appLoader "$TARGET/bin/vmplayer" || perror "Could not link vmplayer to appLoader."
chmod +x "$TARGET"/bin/*
# Compile kernel modules
- return 0 # TODO: Fix kompalieren
pinfo "Compiling required kernel modules."
- cd "./src/vmware-vmx/lib/modules/source" || perror "vmplayer modules source not found."
- local tarball
- for tarball in *.tar; do
- pinfo "Building $tarball...."
- tar xf "$tarball" || perror "Could not untar $tarball"
- cd "${tarball/.tar}-only" || perror "Could not cd to extracted $tarball (tried ${tarball/.tar}-only)"
- make LINUXINCLUDE="${TARGET_DIR}/kernel/build/headers/include" || perror "Could not build kernel module $tarball"
- cp "${tarball/.tar}.ko" "$MODULE_BUILD_DIR/lib/modules/vmware/" || perror "Could not copy ${tarball/.tar}.ko to $MODULE_BUILD_DIR/lib/modules/vmware/"
- cd -
- done
- cd -
+ # build modules
+ build_modules
+
}
post_copy() {
@@ -47,3 +38,69 @@ post_copy() {
tarcopy "$(find /usr/lib/ -name gconv -type d) $(which gconftool-2)" "$TARGET_BUILD_DIR"
}
+build_modules(){
+ pdebug "PAtCHIGN"
+ # need to be in src
+ cd "$MODULE_DIR"/src || perror "Could not cd to '$MODULE_DIR/src'"
+ local VMWARE_MODCONFIG="$MODULE_DIR/src/vmware-vmx/bin/vmware-modconfig"
+ [ -e "$VMWARE_MODCONFIG" ] && chmod +x "$VMWARE_MODCONFIG" || perror "Could not find $VMWARE_MODCONFIG"
+ # link vmware-modconfig-console in the build dir
+ local MANIFEST="$MODULE_DIR/src/vmware-vmx/manifest.xml"
+ local BUILD_NUMBER=$(grep -o -E '<buildNumber>[0-9]*</buildNumber>' "$MANIFEST"|grep -o -E '[0-9]*')
+ local VERSION=$(grep -o -E '<version>[0-9.]*</version>' "$MANIFEST"|grep -o -E '[0-9.]*')
+ local CORE_VERSION=$(grep -o -E '<coreVersion>[0-9.]*</coreVersion>' "$MANIFEST"|grep -o -E '[0-9.]*')
+ # /etc/vmware/config gen
+
+ sed -i.bak1 '/^ETCDIR/d;/^VMISETCDIR/d;/bootstrap/d' $VMWARE_MODCONFIG
+ sed -i.bak2 "s/libdir=.*/libdir=$(echo $MODULE_BUILD_DIR | escape_replace)\/usr\/lib\/vmware/g" $VMWARE_MODCONFIG
+ sed -i.bak3 "s/set\ -e/set\ -e\nPREFIX=\"\/usr\"\nBINDIR=\"\/usr\/bin\"\nSBINDIR=\"\/usr\/sbin\"\nLIBDIR=\"\/usr\/lib\"\nDATADIR=\"\/usr\/share\"\nSYSCONFDIR=\"\/etc\"\nDOCDIR=\"\/usr\/share\/doc\"\nMANDIR=\"\/usr\/share\/man\"\nINCLUDEDIR=\"\/usr\/include\"\nINITDIR=\"\/etc\"\nINITSCRIPTDIR=\"\/etc\/init.d\"\nVMWARE\_INSTALLER=\"\/usr\/lib\/vmware-installer\/$CORE_VERSION\"\nVERSION=\"$CORE_VERSION\"\nVMISVERSION=\"$CORE_VERSION\"\nVMISPYVERSION=\"25\"/g" "$VMWARE_MODCONFIG"
+
+
+ [ -e /etc/vmware/config ] && cp /etc/vmware/config /etc/vmware/config.mltk.bak
+ cat > /etc/vmware/config << EOF
+.encoding = "UTF-8"
+installerDefaults.componentDownloadEnabled = "yes"
+installerDefaults.dataCollectionEnabled = "no"
+installerDefaults.transferVersion = "1"
+installerDefaults.autoSoftwareUpdateEnabled = "yes"
+NETWORKING = "yes"
+VMBLOCK_CONFED = "yes"
+gksu.rootMethod = "sudo"
+libdir = "$MODULE_BUILD_DIR/usr/lib/vmware"
+VMCI_CONFED = "yes"
+VSOCK_CONFED = "yes"
+initscriptdir = "/etc/init.d"
+authd.fullpath = "/usr/sbin/vmware-authd"
+bindir = "/usr/bin"
+vmware.fullpath = "/usr/bin/vmware"
+vix.libdir = "/usr/lib/vmware-vix"
+vix.config.version = "1"
+player.product.version = "$VERSION"
+product.buildNumber = "$BUILD_NUMBER"
+authd.client.port = "902"
+authd.proxy.nfc = "vmware-hostd:ha-nfc"
+authd.soapserver = "TRUE"
+product.version = "9.0.1"
+workstation.product.version = "9.0.1"
+product.name = "VMware Workstation"
+EOF
+ mkdir -p $MODULE_BUILD_DIR/usr/lib/vmware/modules
+ ln -sf $MODULE_DIR/src/vmware-vmx/extra/modules.xml $MODULE_BUILD_DIR/usr/lib/vmware/modules/
+ ln -sf $MODULE_DIR/src/vmware-vmx/lib/modules/source $MODULE_BUILD_DIR/usr/lib/vmware/modules/
+
+ ln -sf appLoader $MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig
+ ln -sf appLoader $MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig-console
+
+ [ ! -e "$MODULES_DIR"/kernel/ksrc/include/generated/utsrelease.h ] && perror "Could not find uts release!!!"
+ local UTS_RELEASE=$(cat "$MODULES_DIR"/kernel/ksrc/include/generated/utsrelease.h |awk -F "\"" '{print $2}')
+
+ pinfo "KOMPALIER"
+ for MOD in vsock vmblock vmmon vmnet vmci; do
+ pdebug "Kompaliere $MOD"
+ $VMWARE_MODCONFIG --console --build-mod -k $UTS_RELEASE $MOD $(which gcc) $MODULES_DIR/kernel/ksrc/include vmplayer $MOD
+ done
+
+ cd -
+
+}
+