summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/alsa/alsa.build16
-rw-r--r--remote/modules/alsa/alsa.conf8
-rw-r--r--remote/modules/kdm/kdm.conf2
-rw-r--r--remote/modules/kernel/kernel.build3
-rwxr-xr-xremote/modules/kernel/patch-speaker6
-rw-r--r--remote/modules/systemd/systemd.build5
-rw-r--r--remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf8
-rw-r--r--remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include450
-rwxr-xr-xremote/modules/vmplayer/data/opt/openslx/bin/vmplayer4
-rw-r--r--remote/modules/xorg/xorg.conf.zypper1
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/bin/setup_network7
-rw-r--r--remote/rootfs/rootfs-stage32/data/etc/systemd/system/load-gfx-driver.service9
l---------remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/load-gfx-driver.service1
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/bin/load-gfx-driver16
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf7
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper7
-rwxr-xr-xremote/setup_target18
l---------remote/targets/stage32-opensuse/alsa1
l---------remote/targets/stage32-vmchooser/busybox1
l---------remote/targets/stage32-vmchooser/consolekit1
l---------remote/targets/stage32-vmchooser/dbus1
l---------remote/targets/stage32-vmchooser/debug1
l---------remote/targets/stage32-vmchooser/kdm1
l---------remote/targets/stage32-vmchooser/kernel1
l---------remote/targets/stage32-vmchooser/pam1
l---------remote/targets/stage32-vmchooser/plymouth1
l---------remote/targets/stage32-vmchooser/policykit1
l---------remote/targets/stage32-vmchooser/rootfs-stage321
l---------remote/targets/stage32-vmchooser/rsyslogd1
l---------remote/targets/stage32-vmchooser/sshd1
l---------remote/targets/stage32-vmchooser/systemd1
l---------remote/targets/stage32-vmchooser/vmchooser1
l---------remote/targets/stage32-vmchooser/xorg1
l---------remote/targets/stage32/alsa1
34 files changed, 326 insertions, 259 deletions
diff --git a/remote/modules/alsa/alsa.build b/remote/modules/alsa/alsa.build
new file mode 100644
index 00000000..03e55d72
--- /dev/null
+++ b/remote/modules/alsa/alsa.build
@@ -0,0 +1,16 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/alsa/alsa.conf b/remote/modules/alsa/alsa.conf
new file mode 100644
index 00000000..17baaaf8
--- /dev/null
+++ b/remote/modules/alsa/alsa.conf
@@ -0,0 +1,8 @@
+REQUIRED_CONTENT_PACKAGES=" alsa-utils
+ libasound2
+"
+REQUIRED_BINARIES=" amixer
+"
+REQUIRED_DIRECTORIES=" /usr/share/alsa
+"
+
diff --git a/remote/modules/kdm/kdm.conf b/remote/modules/kdm/kdm.conf
index d59f0009..dd054cc2 100644
--- a/remote/modules/kdm/kdm.conf
+++ b/remote/modules/kdm/kdm.conf
@@ -30,4 +30,4 @@ REQUIRED_SYSTEM_FILES=" /usr/share/icons/oxygen/16x16/actions/system-reboot.png
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
/usr/share/icons/default/index.theme"
-
+REQUIRED_LDD_BLACKLIST="\|libQtWebKit"
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index 27e00ac1..59bc8e99 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -26,6 +26,9 @@ fetch_source() {
else
pinfo "aufs detected in kernel source :)"
fi
+
+ # fix pc speaker
+ ./patch-speaker
}
build() {
diff --git a/remote/modules/kernel/patch-speaker b/remote/modules/kernel/patch-speaker
new file mode 100755
index 00000000..5d5a9f9a
--- /dev/null
+++ b/remote/modules/kernel/patch-speaker
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+if ! grep notes "ksrc/drivers/input/misc/pcspkr.c" > /dev/null; then
+ echo "Patching pc speaker :-)"
+ sed -i.nomusic -r 's#^static.*int.*pcspkr_event#static const int notes[] = { /*tetris*/ 1319, 988, 1047, 1175, 1047, 988, 880, 880, 1047, 1319, 1175, 1047, 988, 1047, 1175, 1319, 1047, 880, 880, 1175, 1397, 1760, 1568, 1397, 1319, 1047, 1319, 1175, 1047, 988, 988, 1047, 1175, 1319, 1047, 880, 880, /*mario*/ 660, 660, 660, 510, 660, 770, 380, 510, 380, 320, 440, 480, 450, 430, 380, 660, 760, 860, 700, 760, 660, 520, 580, 480, 510, 380, 320, 440, 480, 450, 430, 380, 660, 760, 860, 700, 760, 660, 520, 580, 480, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 500, 760, 720, 680, 620, 650, 1020, 1020, 1020, 380, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 500, 760, 720, 680, 620, 650, 1020, 1020, 1020, 380, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 585, 550, 500, 380, 500, 500, 500, 500, 500, 500, 500, 580, 660, 500, 430, 380, 500, 500, 500, 500, 580, 660, 870, 760, 500, 500, 500, 500, 580, 660, 500, 430, 380, 660, 660, 660, 510, 660, 770, 380, /* elise */ 420, 400, 420, 400, 420, 315, 370, 335, 282, 180, 215, 282, 315, 213, 262, 315, 335, 213, 420, 400, 420, 400, 420, 315, 370, 335, 282, 180, 215, 282, 315, 213, 330, 315, 282 };\nstatic int notePos = 0;\n\n&#g;s#\s*if \(value > 20 && value < 32767\)#\n if (value) value = notes[notePos++ % (sizeof(notes) / sizeof(notes[0]))];\n\n&#g' "ksrc/drivers/input/misc/pcspkr.c"
+fi
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build
index a84cc7b3..a0a57b4d 100644
--- a/remote/modules/systemd/systemd.build
+++ b/remote/modules/systemd/systemd.build
@@ -3,7 +3,10 @@
fetch_source () {
download_untar "$REQUIRED_URL" "src/"
download_untar "$REQUIRED_LIBKMOD_URL" "src/"
-}
+ # Patch PATH environment
+ sed -s -i -r 's#"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin(:/sbin:/bin)?"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/core/main.c
+ sed -s -i -r 's#"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/nspawn/nspawn.c
+}
build () {
#build libkmod
diff --git a/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf b/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf
deleted file mode 100644
index 8887ee6f..00000000
--- a/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-totalmem=1000
-cpu_cores=1
-host_arch=i686
-vtflag=0
-hostmacaddr=00:0c:29:4e:ee:57
-hostip=132.230.4.54
-hostname=slx-client
-cdrom_0=/dev/sr0
diff --git a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include
index 837513d2..9b0fea91 100644
--- a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include
+++ b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include
@@ -20,7 +20,7 @@
runvmwareconfheader ()
{
-echo "# This configuration file was generated by $0" >${conffile}
+echo "# This configuration file was generated by $0" > "$conffile"
# check for the ostype
case "${vmostype}" in
@@ -48,6 +48,7 @@ case "${vmostype}" in
;;
windows7*)
shfolders="TRUE"
+ enable3d="TRUE"
;;
windows8*)
shfolders="TRUE"
@@ -71,121 +72,104 @@ case "${vmostype}" in
shfolders="FALSE"
;;
esac
-case "$vmversion" in
- *)
- svga_autodetect="TRUE"
- numvcpus="1"
- echo ".encoding = \"UTF-8\"
-# version specific stuff - all versions
-config.version = \"8\"" >>${conffile}
- ;;
-esac
-case "$vmversion" in
- 2.*|3.*|4.*|5.*|6.*|7.*|8.*|9.*)
- [ ${shfolders} == FALSE ] || echo "
-# version specific stuff - ver. 2.*|3.*|6.*|7.*|8.*|9.*
-sharedFolder.option = \"alwaysEnabled\"" >>${conffile}
- ;;
-esac
-case "$vmversion" in
- 2.5|3.*|4.*|5.*|6.5|7.*|8.*|9.*)
- if [ "${cpu_cores}" -ge "2" 2>/dev/null ]; then
- numvcpus="2"
- fi
- if [ "${mem}" -ge "8000" 2>/dev/null ]; then
- mem=8000
- fi
- cap3d="TRUE" # helper var for loging output
- echo "
-# version specific stuff - ver. 2.5|3.*|6.5|7.*
-ehci.present = \"TRUE\"
-mks.enable3d = \"${enable3d}\"" >>${conffile}
- ;;
-esac
-case "$vmversion" in
- 3.*|4.*|7.*|8.*|9.*)
- numvcpus="${cpu_cores}"
- if [ "${cpu_cores}" -ge "4" 2>/dev/null ]; then
- numvcpus="4"
- fi
- # svga_autodetect="FALSE" # if defined manual, see below
- echo "
+
+svga_autodetect="TRUE"
+
+numvcpus="${cpu_cores}"
+[ "${cpu_cores}" -ge "4" 2>/dev/null ] && numvcpus="4"
+
+if [ "x$shfolders" != "xFALSE" ]; then
+ ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"'
+else
+ ENABLE_SHARE=''
+fi
+
+[ "${mem}" -ge "8000" ] && mem=8000
+
+cap3d="WHAT IS THIS VAR USED FOR?" # helper var for loging output
+
+cat >> "$conffile" <<HEREEND
+.encoding = "UTF-8"
+config.version = "8"
+
+# general hardware (ehci, 3d accel)
+ehci.present = "TRUE"
+$FORCE3D
+mks.enable3d = "$enable3d"
+
# version specific stuff - ver. 3.*|7.*
-cpuid.coresPerSocket = \"${cpu_cores}\"
-maxvcpus = \"4\"
-monitor.virtual_mmu = \"automatic\"
-monitor.virtual_exec = \"automatic\"
-floppy1.clientDevice = \"FALSE\"
-floppy1.readonly = \"TRUE\"" >>${conffile}
- ;;
-esac
+cpuid.coresPerSocket = "$cpu_cores"
+maxvcpus = "4"
+monitor.virtual_mmu = "automatic"
+monitor.virtual_exec = "automatic"
+floppy1.clientDevice = "FALSE"
+floppy1.readonly = "TRUE"
-echo "
# id
-virtualHW.version = \"${hwver}\"
-displayName = \"${displayname}\"
-guestOS = \"${vmostype}\"
+virtualHW.version = "$hwver"
+displayName = "$displayname"
+guestOS = "$vmostype"
# CPU/MEM
-numvcpus = \"${numvcpus}\"
-memsize = \"${mem}\"
-MemAllowAutoScaleDown = \"FALSE\"
-MemTrimRate = \"-1\"
+numvcpus = "$numvcpus"
+memsize = "$mem"
+MemAllowAutoScaleDown = "FALSE"
+MemTrimRate = "-1"
# ide-disks
-ide0:0.present = \"${ide}\"
-ide0:0.fileName = \"${diskfile}\"
-ide0:0.mode = \"independent-nonpersistent\"
-ide1:0.present = \"${cdrom0}\"
-ide1:0.autodetect = \"TRUE\"
-ide1:0.fileName = \"auto detect\"
-ide1:0.deviceType = \"cdrom-raw\"
-ide1:1.present = \"${cdrom1}\"
-ide1:1.autodetect = \"TRUE\"
-ide1:1.fileName = \"auto detect\"
-ide1:1.deviceType = \"cdrom-raw\"
+ide0:0.present = "$ide"
+ide0:0.fileName = "$diskfile"
+ide0:0.mode = "independent-nonpersistent"
+ide1:0.present = "$cdrom0"
+ide1:0.autodetect = "TRUE"
+ide1:0.fileName = "auto detect"
+ide1:0.deviceType = "cdrom-raw"
+ide1:1.present = "$cdrom1"
+ide1:1.autodetect = "TRUE"
+ide1:1.fileName = "auto detect"
+ide1:1.deviceType = "cdrom-raw"
# scsi-disks
-scsi0.present = \"${scsi}\"
-scsi0:0.present = \"${scsi}\"
-scsi0:0.fileName = \"${diskfile}\"
-scsi0.virtualDev = \"${hddrv}\"
-scsi0:0.mode = \"independent-nonpersistent\"
+scsi0.present = "$scsi"
+scsi0:0.present = "$scsi"
+scsi0:0.fileName = "$diskfile"
+scsi0.virtualDev = "$hddrv"
+scsi0:0.mode = "independent-nonpersistent"
# floppies
-floppy0.present = \"${floppy0}\"
-floppy0.startConnected = \"FALSE\"
-floppy0.autodetect = \"TRUE\"
-floppy0.fileName = \"auto detect\"
+floppy0.present = "$floppy0"
+floppy0.startConnected = "FALSE"
+floppy0.autodetect = "TRUE"
+floppy0.fileName = "auto detect"
+
# we need floppy b: for our windows client configuration
-floppy1.present = \"${floppy1}\"
-floppy1.startConnected = \"TRUE\"
-floppy1.fileType = \"file\"
-floppy1.fileName = \"${floppy1name}\"
+floppy1.present = "$floppy1"
+floppy1.startConnected = "TRUE"
+floppy1.fileType = "file"
+floppy1.fileName = "$floppy1name"
# nics
-ethernet0.present = \"TRUE\"
-ethernet0.addressType = \"static\"
-${network_virtualDev}
-ethernet0.connectionType = \"${network_kind}\"
-#ethernet1.connectionType = \"custom\"
-#ethernet1.vnet = \"/dev/vmnet2\"
-ethernet0.address = \"00:50:56:${VM_ID}:${machostpart}\"
-ethernet0.wakeOnPcktRcv = \"FALSE\"
+ethernet0.present = "TRUE"
+ethernet0.addressType = "static"
+$network_virtualDev
+ethernet0.connectionType = "$network_kind"
+#ethernet1.connectionType = "custom"
+#ethernet1.vnet = "/dev/vmnet2"
+ethernet0.address = "00:50:56:$VM_ID:$machostpart"
+ethernet0.wakeOnPcktRcv = "FALSE"
# sound
-#TODO: enable sound
-sound.present = \"FALSE\"
-sound.fileName = \"-1\"
-sound.autodetect = \"TRUE\"
-sound.virtualdev = \"${sound}\"
+sound.present = "TRUE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
+sound.virtualdev = "$sound"
# svga
-svga.autodetect = \"${svga_autodetect}\"
+svga.autodetect = "$svga_autodetect"
# usb
-usb.present = \"TRUE\"
-usb.generic.autoconnect = \"TRUE\"
+usb.present = "TRUE"
+usb.generic.autoconnect = "TRUE"
# pci configuration
usb.pciSlotNumber = "16"
@@ -195,35 +179,37 @@ ehci.pciSlotNumber = "19"
scsi0.pciSlotNumber = "20"
# shared folders
-sharedFolder0.present = \"${shfolders}\"
-sharedFolder0.enabled = \"${shfolders}\"
-sharedFolder0.expiration = \"never\"
-sharedFolder0.guestName = \"${sharename}\"
-sharedFolder0.hostPath = \"${sharepath}\"
-sharedFolder0.readAccess = \"TRUE\"
-sharedFolder0.writeAccess = \"TRUE\"
-sharedFolder.maxNum = \"1\"
+$ENABLE_SHARE
+sharedFolder0.present = "$shfolders"
+sharedFolder0.enabled = "$shfolders"
+sharedFolder0.expiration = "never"
+sharedFolder0.guestName = "$sharename"
+sharedFolder0.hostPath = "$sharepath"
+sharedFolder0.readAccess = "TRUE"
+sharedFolder0.writeAccess = "TRUE"
+sharedFolder.maxNum = "1"
# dirs/configs
-tmpDirectory = \"${redodir}\"
-redoLogDir = \"${redodir}\"
-mainMem.useNamedFile = \"TRUE\"
-snapshot.disabled = \"TRUE\"
-tools.syncTime = \"TRUE\"
-isolation.tools.hgfs.disable = \"FALSE\"
-hgfs.mapRootShare = \"TRUE\"
-isolation.tools.dnd.disable = \"FALSE\"
-isolation.tools.copy.enable = \"TRUE\"
-isolation.tools.paste.enabled = \"TRUE\"
+tmpDirectory = "$redodir"
+redoLogDir = "$redodir"
+mainMem.useNamedFile = "TRUE"
+snapshot.disabled = "TRUE"
+tools.syncTime = "TRUE"
+isolation.tools.hgfs.disable = "FALSE"
+hgfs.mapRootShare = "TRUE"
+isolation.tools.dnd.disable = "FALSE"
+isolation.tools.copy.enable = "TRUE"
+isolation.tools.paste.enabled = "TRUE"
# serial port
-serial0.present = \"${serial}\"
-${serialdev}
+serial0.present = "$serial"
+$serialdev
# parallel port
-parallel0.present = \"${parallel}\"
-parallel0.bidirectional = \"${paralbidi}\"
-${paraldev}" >>${conffile}
+parallel0.present = "$parallel"
+parallel0.bidirectional = "$paralbidi"
+$paraldev
+HEREEND
# set the appropriate permissions for the vmware config file
chmod u+rwx ${conffile} >/dev/null 2>&1
@@ -231,67 +217,72 @@ chmod u+rwx ${conffile} >/dev/null 2>&1
preferencesheader ()
{
-echo ".encoding = \"UTF-8\"
+ cat > "$vmhome/preferences" <<HEREEND
+.encoding = "UTF-8"
# This configuration file was generated by $0
# updates/tips
-webUpdate.enabled = \"FALSE\"
-pref.downloadPermission = \"deny\"
-pref.vmplayer.downloadPermission = \"deny\"
-pref.vmplayer.webUpdateOnStartup = \"FALSE\"
-pref.tip.startup = \"FALSE\"
-hints.hideAll = \"TRUE\"
-hint.vmui.showAllUSBDevs = \"FALSE\"
+webUpdate.enabled = "FALSE"
+pref.downloadPermission = "deny"
+pref.vmplayer.downloadPermission = "deny"
+pref.vmplayer.webUpdateOnStartup = "FALSE"
+pref.tip.startup = "FALSE"
+hints.hideAll = "TRUE"
+hint.vmui.showAllUSBDevs = "FALSE"
# configs
-prefvmx.defaultVMPath = \"${vmhome}\"
-prefvmx.mru.config = \"${conffile}:\"
+prefvmx.defaultVMPath = "$vmhome"
+prefvmx.mru.config = "$conffile:"
# hot keys
-pref.hotkey.control = \"true\"
-pref.hotkey.alt = \"true\"
-pref.hotkey.shift = \"true\"
-pref.hotkey.gui = \"true\"
-gui.restricted = \"true\"
+pref.hotkey.control = "true"
+pref.hotkey.alt = "true"
+pref.hotkey.shift = "true"
+pref.hotkey.gui = "true"
+gui.restricted = "true"
# fullscreen/mouse/keyboard
-pref.fullscreen.toolbarPixels = \"0\"
-pref.vmplayer.fullscreen.autohide = \"TRUE\"
-pref.grabOnMouseClick = \"TRUE\"
-pref.grabOnKeyPress = \"FALSE\"
-pref.motionGrab = \"TRUE\"
-pref.motionUngrab = \"TRUE\"
-pref.hideCursorOnUngrab = \"TRUE\"
-pref.autoFit = \"TRUE\"
-pref.autoFitFullScreen = \"fitGuestToHost\"
-pref.vmplayer.exit.vmAction = \"poweroff\"
-pref.vmplayer.confirmOnExit = \"TRUE\"
+pref.fullscreen.toolbarPixels = "0"
+pref.vmplayer.fullscreen.autohide = "TRUE"
+pref.grabOnMouseClick = "TRUE"
+pref.grabOnKeyPress = "FALSE"
+pref.motionGrab = "TRUE"
+pref.motionUngrab = "TRUE"
+pref.hideCursorOnUngrab = "TRUE"
+pref.autoFit = "TRUE"
+pref.autoFitFullScreen = "fitGuestToHost"
+pref.vmplayer.exit.vmAction = "poweroff"
+pref.vmplayer.confirmOnExit = "TRUE"
# shared folders
-pref.enableAllSharedFolders = \"TRUE\"
+pref.enableAllSharedFolders = "TRUE"
-# eula" >${vmhome}/preferences
+# eula
+
+HEREEND
# different eula parameters from Workstation 9+/ Player 5+
-case "$vmversion" in
+ case "$vmversion" in
3.*|4.*|7.*|8.*)
- echo "
-pref.eula.size = \"2\"
-pref.eula.0.appName = \"VMware Player\"
-pref.eula.0.buildNumber = \"${vmbuild}\"
-pref.eula.1.appName = \"VMware Workstation\"
-pref.eula.1.buildNumber = \"${vmbuild}\"" >>${vmhome}/preferences
+ cat >> "$vmhome/preferences" <<HEREEND
+pref.eula.size = "2"
+pref.eula.0.appName = "VMware Player"
+pref.eula.0.buildNumber = "$vmbuild"
+pref.eula.1.appName = "VMware Workstation"
+pref.eula.1.buildNumber = "$vmbuild"
+HEREEND
;;
5.*|9.*)
# code
- echo "
-pref.eula.count = \"2\"
-pref.eula0.product = \"VMware Player\"
-pref.eula0.build = \"${vmbuild}\"
-pref.eula1.product = \"VMware Workstation\"
-pref.eula1.build = \"${vmbuild}\"" >>${vmhome}/preferences
+ cat >> "$vmhome/preferences" <<HEREEND
+pref.eula.count = "2"
+pref.eula0.product = "VMware Player"
+pref.eula0.build = "$vmbuild"
+pref.eula1.product = "VMware Workstation"
+pref.eula1.build = "$vmbuild"
+HEREEND
;;
-esac
+ esac
}
@@ -299,12 +290,17 @@ esac
# declaration of default variables
################################################################################
+
+[ "$mem" -gt 3800 -a "$(uname -m)" != "x86_64" ] && mem=3800
+
# VM-ID static (0D), remove if changed to 00
VM_ID="0D"
# should be dynamic
if [ "x$(which bc)" != "x" ]; then
- VM_ID=$(echo "obase=16; $$" | bc)
- VM_ID=$(expr substr $VM_ID $(expr ${#VM_ID} - 1) 2)
+ VM_ID=$(echo "obase=16; $$" | bc)
+ VM_ID=$(expr substr $VM_ID $(expr ${#VM_ID} - 1) 2)
+else
+ VM_ID=$[ $$ % 100 ]
fi
# temporary disk space for logs, etc...
redodir=/tmp/vmware/${USER}.$$
@@ -332,9 +328,9 @@ vmopt="-X"
# use different network card (default e1000, vlance, vmxnet)
if [ -n "${network_card}" ]; then
- network_virtualDev="ethernet0.virtualDev = \"${network_card}\""
+ network_virtualDev="ethernet0.virtualDev = \"${network_card}\""
else
- network_virtualDev='# using default virtualDev for ethernet0'
+ network_virtualDev='# using default virtualDev for ethernet0'
fi
# set standard sound card, overwrite depending on OS (options sb16, es1371, hdaudio)
@@ -342,82 +338,100 @@ sound="es1371"
# check for 3D configuration setting
case "${enable3d}" in
- *true*|*yes*)
- #TODO: enable 3D
- enable3d="FALSE"
- ;;
- *)
- enable3d="FALSE"
- ;;
+*true*|*yes*|*TRUE*|*True*|*YES*|*Yes*)
+ enable3d="TRUE"
+ ;;
+*)
+ enable3d="FALSE"
+ ;;
esac
+# check for whitelisted HW-3D
+. /opt/openslx/config
+local FORCE3D=""
+if [ -n "$SLX_VMWARE_3D" ]; then
+ FORCE3D='mks.gl.allowBlacklistedDrivers = "TRUE"'
+ enable3d="TRUE"
+fi
+
# serial/parallel port defined (e.g. "ttyS0, lp0" or "autodetect")
case "$serial" in
- tty*)
- serialdev="serial0.filename = \"/dev/${serial}\""
- serial="TRUE"
- ;;
- auto*)
- serialdev="serial0.autodetect = \"TRUE\""
- serial="TRUE"
- ;;
- *)
- serialdev="# no serial port configured"
- serial="FALSE"
- ;;
+tty*)
+ if [ -e "/dev/$serial" ]; then
+ serialdev="serial0.filename = \"/dev/${serial}\""
+ serial="TRUE"
+ else
+ serialdev="# no serial port configured"
+ serial="FALSE"
+ fi
+ ;;
+auto*)
+ serialdev="serial0.autodetect = \"TRUE\""
+ serial="TRUE"
+ ;;
+*)
+ serialdev="# no serial port configured"
+ serial="FALSE"
+ ;;
esac
+
case "$parallel" in
- lp*|parport*)
- paraldev="parallel0.filename = \"/dev/${parallel}\""
- paralbidi="TRUE"
- parallel="TRUE"
- ;;
- auto*)
- paraldev="parallel0.autodetect = \"TRUE\""
- paralbidi="TRUE"
- parallel="TRUE"
- ;;
- *)
- paraldev="# no parallel port configured"
- paralbidi="FALSE"
- parallel="FALSE"
- ;;
+lp*|parport*)
+ if [ -e "/dev/$parallel" ]; then
+ paraldev="parallel0.filename = \"/dev/${parallel}\""
+ paralbidi="TRUE"
+ parallel="TRUE"
+ else
+ paraldev="# no parallel port configured"
+ paralbidi="FALSE"
+ parallel="FALSE"
+ fi
+ ;;
+auto*)
+ paraldev="parallel0.autodetect = \"TRUE\""
+ paralbidi="TRUE"
+ parallel="TRUE"
+ ;;
+*)
+ paraldev="# no parallel port configured"
+ paralbidi="FALSE"
+ parallel="FALSE"
+ ;;
esac
# check if ide/scsi and hwver of image
-# read only the first 30 lines to be shure
+# read only the first 30 lines to be sure
imghead=$(head -n 30 ${diskfile})
-hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" |\
- awk -F '"' '{print $2}')
-hwver=$(echo "${imghead}" | grep -m1 -ia "ddb.virtualHWVersion" |\
- awk -F '"' '{print $2}')
+hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" | awk -F '"' '{print $2}')
+hwver=$(echo "${imghead}" | grep -m1 -ia "ddb.virtualHWVersion" | awk -F '"' '{print $2}')
case "${hddrv}" in
- ide)
- ide="TRUE"
- scsi="FALSE"
- ;;
- lsilogic|buslogic)
- ide="FALSE"
- scsi="TRUE"
- ;;
+ide)
+ ide="TRUE"
+ scsi="FALSE"
+ ;;
+lsilogic|buslogic)
+ ide="FALSE"
+ scsi="TRUE"
+ ;;
esac
# write configuration files
################################################################################
# create vmware directories
-mkdir -p ${redodir} >/dev/null 2>&1
-mkdir -p ${confdir} >/dev/null 2>&1
-mkdir -p ${vmhome}/dndlogs >/dev/null 2>&1
-touch ${vmhome}/dndlogs/dndlog.conf >/dev/null 2>&1
+mkdir -p "$redodir" >/dev/null 2>&1
+mkdir -p "$confdir" >/dev/null 2>&1
+mkdir -p "$vmhome/dndlogs" >/dev/null 2>&1
+touch "$vmhome/dndlogs/dndlog.conf" >/dev/null 2>&1
# create preferences
preferencesheader
# create VMware startup file
runvmwareconfheader
+
# link to conffile if confdir != redodir
-ln -s ${conffile} ${redodir}/run-vmware.conf >/dev/null 2>&1
+ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1
# sync is needed to ensure that data is really written to virtual disk
sync
@@ -425,7 +439,7 @@ sync
# own nvram. We need it for floppy drive b, default nvram has just drive a
# TODO: optimize, currently kinda inefficient, too much copys, but we
# don't know which one is installed...
-cp /etc/openslx/vmware/nvram ${confdir}/nvram 2>/dev/null
+cp "/etc/openslx/vmware/nvram" "$confdir/nvram" 2>/dev/null
# logging and stdout
diff --git a/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer b/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer
index 030e9175..147f514f 100755
--- a/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer
+++ b/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer
@@ -1,6 +1,10 @@
#!/bin/sh
# radically simplified version of the original script vmplayer by VMware Inc.
PREFIX=/usr/lib/vmware # depends on the vmware location
+
+# HACK: Let the OpenGL driver report s3tc capability even if not present, so 3D will be enabled
+export force_s3tc_enable=true
+
exec "$PREFIX"'/lib/wrapper-gtk24.sh' \
"$PREFIX"'/lib' \
"$PREFIX"'/bin/vmplayer' \
diff --git a/remote/modules/xorg/xorg.conf.zypper b/remote/modules/xorg/xorg.conf.zypper
index e0636dd7..33aba5eb 100644
--- a/remote/modules/xorg/xorg.conf.zypper
+++ b/remote/modules/xorg/xorg.conf.zypper
@@ -23,6 +23,7 @@ REQUIRED_CONTENT_PACKAGES=" xorg-x11
xkeyboard-config
xkbcomp
dejavu-fonts
+ libxcb-glx0
kdm-branding-openSUSE"
REQUIRED_BINARIES=" Xorg
gtf
diff --git a/remote/rootfs/rootfs-stage31/data/bin/setup_network b/remote/rootfs/rootfs-stage31/data/bin/setup_network
index 57872244..8aedeaf1 100755
--- a/remote/rootfs/rootfs-stage31/data/bin/setup_network
+++ b/remote/rootfs/rootfs-stage31/data/bin/setup_network
@@ -14,9 +14,10 @@ BRIDGE="br0"
SLAVE="eth0"
BRIDGEMAC="$MAC"
-# Flip mac address of original interface - this var is not local so init sees the changes too
-MAC="$(echo "$MAC" | awk -F ':' '{printf $1 ":" $2 ":" $5 ":" $3 ":" $6 ":" $4}')"
-ip link set addr "$MAC" "$SLAVE"
+# Following was supposed to prevent scripts from getting confused by multiple interfaces with same MAC - does not work though
+## Flip mac address of original interface - this var is not local so init sees the changes too
+#MAC="$(echo "$MAC" | awk -F ':' '{printf $1 ":" $2 ":" $5 ":" $3 ":" $6 ":" $4}')"
+#ip link set addr "$MAC" "$SLAVE"
brctl addbr "$BRIDGE" || drop_shell "Could not create bridge $BRIDGE"
brctl stp "$BRIDGE" 0
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/load-gfx-driver.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/load-gfx-driver.service
new file mode 100644
index 00000000..bdf3258c
--- /dev/null
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/load-gfx-driver.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Load DRM GFX driver and 3D
+Before=sysinit.target shutdown.target
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/opt/openslx/bin/load-gfx-driver
+RemainAfterExit=yes
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/load-gfx-driver.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/load-gfx-driver.service
new file mode 120000
index 00000000..b72d0453
--- /dev/null
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/load-gfx-driver.service
@@ -0,0 +1 @@
+../load-gfx-driver.service \ No newline at end of file
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/load-gfx-driver b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/load-gfx-driver
new file mode 100755
index 00000000..04fbea6e
--- /dev/null
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/load-gfx-driver
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+PCIFILE=/tmp/lspci-output
+
+if ! lspci -n > "$PCIFILE"; then
+ echo "lspci -n failed..."
+ exit 1
+fi
+
+if grep -E ' 8086:0152( |$)' "$PCIFILE" > /dev/null; then
+ echo "i915 - enable 3D"
+ echo -e "# Written by load-gfx-driver\nSLX_VMWARE_3D=yes" >> "/opt/openslx/config"
+fi
+
+exit 0
+
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
index a2dd3987..5437621d 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
@@ -50,7 +50,8 @@ REQUIRED_LIBRARIES=" libcap
libresolv
libau"
REQUIRED_DIRECTORIES="/lib/xtables"
-REQUIRED_FILES=" /etc/issue
+REQUIRED_FILES="
+ /etc/issue
/etc/inputrc
/etc/localtime
/etc/login.defs
@@ -61,7 +62,9 @@ REQUIRED_FILES=" /etc/issue
/etc/netconfig
/etc/modprobe.d/blacklist.conf
/etc/fonts/fonts.conf
- /etc/X11/app-defaults/Xvidtune"
+ /etc/X11/app-defaults/Xvidtune
+ /etc/ld.so.cache
+"
REQUIRED_KERNEL_MODULES=" kernel/drivers/cpufreq
kernel/drivers/memstick
kernel/drivers/mfd
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
index 89ffb6a1..70fa2a2f 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
@@ -20,7 +20,8 @@ REQUIRED_LIBRARIES=" libcap
libtinfo
libresolv
libau"
-REQUIRED_FILES=" /etc/issue
+REQUIRED_FILES="
+ /etc/issue
/etc/inputrc
/etc/localtime
/etc/login.defs
@@ -29,7 +30,9 @@ REQUIRED_FILES=" /etc/issue
/etc/services
/etc/networks
/etc/netconfig
- /usr/share/X11/app-defaults/Xvidtune"
+ /usr/share/X11/app-defaults/Xvidtune
+ /etc/ld.so.cache
+"
REQUIRED_KERNEL_MODULES=" kernel/drivers/cpufreq
kernel/drivers/memstick
kernel/drivers/mfd
diff --git a/remote/setup_target b/remote/setup_target
index 369cdbac..286daf3a 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -46,11 +46,11 @@ read_build () {
copy_files_with_deps () {
- [ ! -d $MODULE_BUILD_DIR ] && pinfo "No build directory found, skipping dependency copying" && return 0
- cd $MODULE_BUILD_DIR
+ [ ! -d "$MODULE_BUILD_DIR" ] && pinfo "No build directory found, skipping dependency copying" && return 0
+ cd "$MODULE_BUILD_DIR"
COPYFILES_LIST="list_wanted_stage3.2"
- [ -e ${COPYFILES_LIST} ] && rm ${COPYFILES_LIST}
+ [ -e "${COPYFILES_LIST}" ] && rm "${COPYFILES_LIST}"
[ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..."
@@ -58,7 +58,7 @@ copy_files_with_deps () {
do
local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a \( -type f -o -type l \) )
# only do if more than one candidate found
- if [ $(echo $FILE_CANDIDATES | wc -w) -gt 1 ]; then
+ if [ "$(echo $FILE_CANDIDATES | wc -w)" -gt 1 ]; then
pdebug "Candidates for $FILENAME are: $(echo $FILE_CANDIDATES)"
local FINAL_LIST=""
for FILE in $FILE_CANDIDATES; do
@@ -82,7 +82,7 @@ copy_files_with_deps () {
fi
for FILE in $FINAL_LIST; do
pdebug "* $FILE"
- strip $FILE || pwarning "Could not strip '${FILE}'"
+ strip "$FILE" || pwarning "Could not strip '${FILE}'"
get_link_chain "${MODULE_BUILD_DIR}/${FILE}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}"
get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${FILE}" >> "${COPYFILES_LIST}"
done
@@ -94,7 +94,7 @@ copy_files_with_deps () {
for LOCATION in $(find . -name ${LIB}.so\*)
do
pdebug "* $LOCATION"
- strip $LOCATION || pwarning "Could not strip '${LOCATION}'"
+ strip "$LOCATION" || pwarning "Could not strip '${LOCATION}'"
get_link_chain "${MODULE_BUILD_DIR}/${LOCATION}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}"
get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${LOCATION}" >> "${COPYFILES_LIST}"
done
@@ -141,10 +141,10 @@ generate_target() {
TARGET_BUILD_DIR="${MODE_DIR}/builds/${TARGET}"
[ -e "${ROOT_DIR}/logs/${TARGET}.size" ] && . "${ROOT_DIR}/logs/${TARGET}.size" || echo "declare -A BUILD_SIZE" >> "${ROOT_DIR}/logs/${TARGET}.size"
- [ -d $TARGET_DIR ] || perror "Given target directory does not exist: $TARGET_DIR"
+ [ -d "$TARGET_DIR" ] || perror "Given target directory does not exist: $TARGET_DIR"
- [[ $TARGET == builds || $TARGET == modules ]] && \
- perror "Target directory cannot be named 'builds' nor 'modules'."
+ [[ "$TARGET" == "builds" || "$TARGET" == "modules" ]] && \
+ perror "Target directory cannot be named 'builds' or 'modules'."
pinfo "Generating '$TARGET_BUILD_DIR' for '$TARGET'"
diff --git a/remote/targets/stage32-opensuse/alsa b/remote/targets/stage32-opensuse/alsa
new file mode 120000
index 00000000..7e13d263
--- /dev/null
+++ b/remote/targets/stage32-opensuse/alsa
@@ -0,0 +1 @@
+../../modules/alsa \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/busybox b/remote/targets/stage32-vmchooser/busybox
deleted file mode 120000
index 4f45cedf..00000000
--- a/remote/targets/stage32-vmchooser/busybox
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/busybox \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/consolekit b/remote/targets/stage32-vmchooser/consolekit
deleted file mode 120000
index 261968c7..00000000
--- a/remote/targets/stage32-vmchooser/consolekit
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/consolekit \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/dbus b/remote/targets/stage32-vmchooser/dbus
deleted file mode 120000
index dd148715..00000000
--- a/remote/targets/stage32-vmchooser/dbus
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/dbus \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/debug b/remote/targets/stage32-vmchooser/debug
deleted file mode 120000
index c05237d6..00000000
--- a/remote/targets/stage32-vmchooser/debug
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/debug \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/kdm b/remote/targets/stage32-vmchooser/kdm
deleted file mode 120000
index 727ed5b5..00000000
--- a/remote/targets/stage32-vmchooser/kdm
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/kdm \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/kernel b/remote/targets/stage32-vmchooser/kernel
deleted file mode 120000
index 044f086d..00000000
--- a/remote/targets/stage32-vmchooser/kernel
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/kernel \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/pam b/remote/targets/stage32-vmchooser/pam
deleted file mode 120000
index 588acdbf..00000000
--- a/remote/targets/stage32-vmchooser/pam
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/pam \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/plymouth b/remote/targets/stage32-vmchooser/plymouth
deleted file mode 120000
index 66a16832..00000000
--- a/remote/targets/stage32-vmchooser/plymouth
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/plymouth \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/policykit b/remote/targets/stage32-vmchooser/policykit
deleted file mode 120000
index 39b77c7f..00000000
--- a/remote/targets/stage32-vmchooser/policykit
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/policykit \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/rootfs-stage32 b/remote/targets/stage32-vmchooser/rootfs-stage32
deleted file mode 120000
index 96dcbb86..00000000
--- a/remote/targets/stage32-vmchooser/rootfs-stage32
+++ /dev/null
@@ -1 +0,0 @@
-../../rootfs/rootfs-stage32 \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/rsyslogd b/remote/targets/stage32-vmchooser/rsyslogd
deleted file mode 120000
index 339d02f8..00000000
--- a/remote/targets/stage32-vmchooser/rsyslogd
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/rsyslogd \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/sshd b/remote/targets/stage32-vmchooser/sshd
deleted file mode 120000
index 56b4e4b5..00000000
--- a/remote/targets/stage32-vmchooser/sshd
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/sshd \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/systemd b/remote/targets/stage32-vmchooser/systemd
deleted file mode 120000
index 2dc58bd3..00000000
--- a/remote/targets/stage32-vmchooser/systemd
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/systemd \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/vmchooser b/remote/targets/stage32-vmchooser/vmchooser
deleted file mode 120000
index 4d883e71..00000000
--- a/remote/targets/stage32-vmchooser/vmchooser
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/vmchooser/ \ No newline at end of file
diff --git a/remote/targets/stage32-vmchooser/xorg b/remote/targets/stage32-vmchooser/xorg
deleted file mode 120000
index a9494860..00000000
--- a/remote/targets/stage32-vmchooser/xorg
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/xorg \ No newline at end of file
diff --git a/remote/targets/stage32/alsa b/remote/targets/stage32/alsa
new file mode 120000
index 00000000..7e13d263
--- /dev/null
+++ b/remote/targets/stage32/alsa
@@ -0,0 +1 @@
+../../modules/alsa \ No newline at end of file