OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../vmware/postlinux.conf
  5. # Copyright (C) 2006 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. # --- SDE-COPYRIGHT-NOTE-END ---
  14. vmware_bmdir="../";
  15. vmware_buildmod()
  16. {
  17. var_append makeopt " " "KERNEL_UNAME=$lx_kernelrelease"
  18. var_append makeopt " " "VM_UNAME=$lx_kernelrelease"
  19. var_append makeopt " " "HEADER_DIR=$kerneldir/include"
  20. var_append makeopt " " "CC=$KCC"
  21. echo $MAKE $makeopt
  22. eval $MAKE $makeopt
  23. }
  24. vmware_mkvmmon()
  25. {
  26. echo "VMWare Monitor -------------";
  27. tar xvf vmmon.tar;
  28. pushd vmmon-only;
  29. vmware_buildmod;
  30. cp -fv vmmon.ko "$vmware_bmdir/objects/vmmon.o"
  31. popd;
  32. }
  33. vmware_mkvmnet()
  34. {
  35. echo "VMWare Network -------------";
  36. tar xvf vmnet.tar
  37. pushd vmnet-only;
  38. vmware_buildmod;
  39. cp -fv vmnet.ko "$vmware_bmdir/objects/vmnet.o"
  40. popd;
  41. }
  42. vmware_mkvmpp()
  43. {
  44. echo "VMWare PP --------------";
  45. tar xvf vmppuser.tar
  46. pushd vmppuser-only;
  47. vmware_buildmod;
  48. cp -fv vmppuser.ko "$vmware_bmdir/objects/vmppuser.o"
  49. popd;
  50. }
  51. vmware_mkdesc()
  52. {
  53. pfile="$vmware_bmdir/properties"
  54. echo "VMWare Properties file: $pfile";
  55. echo "UtsRelease $lx_kernelrelease" > $pfile;
  56. if grep -q "CONFIG_MODVERSIONS=y" $kerneldir/.config; then
  57. echo "ModVersion yes" >> $pfile;
  58. else
  59. echo "ModVersion no" >> $pfile;
  60. fi
  61. if grep -q "CONFIG_SMP=y" $kerneldir/.config; then
  62. echo "SMP yes" >> $pfile;
  63. else
  64. echo "SMP no" >> $pfile;
  65. fi
  66. echo "PageOffset C0000000" >> $pfile;
  67. echo "Comment T2 $target $sdever" >> $pfile;
  68. }
  69. vmware_mkmodules ()
  70. {
  71. echo "Building vmware-modules...";
  72. echo "VMWare being built for linux: $lx_kernelrelease";
  73. echo "VMWare-Prefix: $SDECFG_PKG_VMWARE_PREFIX";
  74. pf=$( match_source_file -p vmware-any-any )
  75. if [ "$pf" != "" ] ; then
  76. tar $taropt $pf
  77. cp -av vmware-any-any*/*.tar lib/modules/source
  78. fi
  79. pushd lib/modules/source/
  80. if grep -q "CONFIG_SMP=y" $kerneldir/.config; then
  81. vmware_bmdir="$SDECFG_PKG_VMWARE_PREFIX/lib/vmware/modules/binary/smp-$lx_kernelrelease.$arch_machine.T2-$target";
  82. else
  83. vmware_bmdir="$SDECFG_PKG_VMWARE_PREFIX/lib/vmware/modules/binary/up-$lx_kernelrelease.$arch_machine.T2-$target";
  84. fi;
  85. mkdir -p $vmware_bmdir;
  86. mkdir -p "$vmware_bmdir/objects";
  87. echo "VMWare modules will go to: $vmware_bmdir";
  88. vmware_mkvmmon;
  89. vmware_mkvmnet;
  90. if [ "$SDECFG_PKG_VMWARE_PPUSER" = 1 ] ; then
  91. vmware_mkvmpp;
  92. fi
  93. vmware_mkdesc;
  94. popd
  95. echo "VMWARE DONE -------------------------------------";
  96. }
  97. custmain="vmware_mkmodules"