Dash:
[t2-trunk.git] / package / emulators / vmware / postlinux.conf
blobfe57b4e0d4a485f470a313b365d68bc26e718474
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3
4 # T2 SDE: package/.../vmware/postlinux.conf
5 # Copyright (C) 2006 - 2008 The T2 SDE Project
6
7 # More information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 vmware_bmdir="../";
17 vmware_buildmod()
19         var_append makeopt " " "KERNEL_UNAME=$lx_kernelrelease"
20         var_append makeopt " " "VM_UNAME=$lx_kernelrelease"
21         var_append makeopt " " "HEADER_DIR=$kerneldir/include"
22         var_append makeopt " " "CC=$KCC"
23         echo $MAKE $makeopt
24         eval $MAKE $makeopt
27 vmware_mkvmmon()
29         echo "VMWare Monitor -------------";
30         tar xvf vmmon.tar;
31         pushd vmmon-only;       
32         vmware_buildmod;
33         cp -fv vmmon.ko "$vmware_bmdir/objects/vmmon.o"
34         popd;
37 vmware_mkvmnet()
39         echo "VMWare Network -------------";
40         tar xvf vmnet.tar
41         pushd vmnet-only;
42         vmware_buildmod;
43         cp -fv vmnet.ko "$vmware_bmdir/objects/vmnet.o"
44         popd;
47 vmware_mkvmblock()
49         echo "VMWare Drag&Drop -----------";
50         tar xvf vmblock.tar
51         pushd vmblock-only;
52         vmware_buildmod;
53         cp -fv vmblock.ko "$vmware_bmdir/objects/vmblock.o"
54         popd;
57 vmware_mkvmpp()
59         echo "VMWare PP     --------------";
60         tar xvf vmppuser.tar
61         pushd vmppuser-only;
62         vmware_buildmod;
63         cp -fv vmppuser.ko "$vmware_bmdir/objects/vmppuser.o"
64         popd;
67 vmware_mkdesc()
69         pfile="$vmware_bmdir/properties"
70         echo "VMWare Properties file: $pfile";
71         echo "UtsRelease $lx_kernelrelease" > $pfile;
72         if grep -q "CONFIG_MODVERSIONS=y" $kerneldir/.config; then
73                 echo "ModVersion yes" >> $pfile;
74         else
75                 echo "ModVersion no" >> $pfile;
76         fi
77         if grep -q "CONFIG_SMP=y" $kerneldir/.config; then
78                 echo "SMP yes" >> $pfile;
79         else
80                 echo "SMP no" >> $pfile;
81         fi
82         echo "PageOffset C0000000" >> $pfile;
83         echo "Comment T2 $target $sdever" >> $pfile;
86 vmware_mkmodules ()
88         echo "Building vmware-modules...";
89         echo "VMWare being built for linux: $lx_kernelrelease";
90         echo "VMWare-Prefix: $SDECFG_PKG_VMWARE_PREFIX";
92         if pf="`match_source_file -p vmware-any-any vmware`"; then
93                 tar $taropt $pf
94                 cp -av vmware-any-any*/*.tar lib/modules/source
95         fi
97         pushd lib/modules/source/
98         if grep -q "CONFIG_SMP=y" $kerneldir/.config; then
99                 vmware_bmdir="$root/$SDECFG_PKG_VMWARE_PREFIX/lib/vmware/modules/binary/smp-$lx_kernelrelease.$arch_machine.T2-$target";
100         else
101                 vmware_bmdir="$root/$SDECFG_PKG_VMWARE_PREFIX/lib/vmware/modules/binary/up-$lx_kernelrelease.$arch_machine.T2-$target";
102         fi;
103         mkdir -p $vmware_bmdir;
104         mkdir -p "$vmware_bmdir/objects";
105         echo "VMWare modules will go to: $vmware_bmdir";
106         vmware_mkvmmon;
107         vmware_mkvmnet;
108         vmware_mkvmblock;
109         if [ "$SDECFG_PKG_VMWARE_PPUSER" = 1 ]; then
110                 vmware_mkvmpp;
111         fi
112         vmware_mkdesc;
113         popd
114         echo "VMWARE DONE -------------------------------------";
117 custmain="vmware_mkmodules"