summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/xserver/files
diff options
context:
space:
mode:
authorBastian Wissler2008-08-29 11:31:34 +0200
committerBastian Wissler2008-08-29 11:31:34 +0200
commitea946678e9ebc00d37b489ec4f22e2bbf2bc04a3 (patch)
treeb4beabaf77385081cc48631e94c8d720b620f7f5 /os-plugins/plugins/xserver/files
parent* removed uclibc-busybox from tools folder, too (as it is not being used) (diff)
downloadcore-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.tar.gz
core-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.tar.xz
core-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.zip
First real stage3 implementation (I just thought last time)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2128 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/files')
-rwxr-xr-xos-plugins/plugins/xserver/files/linkage.sh104
-rwxr-xr-xos-plugins/plugins/xserver/files/ubuntu-gfx-install.sh27
2 files changed, 128 insertions, 3 deletions
diff --git a/os-plugins/plugins/xserver/files/linkage.sh b/os-plugins/plugins/xserver/files/linkage.sh
new file mode 100755
index 00000000..040b4c8a
--- /dev/null
+++ b/os-plugins/plugins/xserver/files/linkage.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+#
+#
+# general: linking libGL.so and stuff to writable locations
+#
+#
+
+PLUGIN_FOLDER="/opt/openslx/plugin-repo/xserver/"
+MESA_FOLDER="${PLUGIN_FOLDER}mesa/"
+# this has to be writable in stage3 - any folder is possible
+LINK_FOLDER="/var/lib/X11R6/xserver/"
+
+# these are to link libs to
+ATIROOT="${PLUGIN_FOLDER}ati/atiroot"
+NVROOT="${PLUGIN_FOLDER}nvidia/nvroot"
+
+# declare array of conflicting libs
+# TODO: add conflicting libs for opengl here
+declare -a CONFLIBS=("/usr/lib/libGL.so.1.2" "/usr/lib/libGL.so.1")
+
+
+if [ ! -d "${MESA_FOLDER}usr/lib/" ]; then
+ mkdir -p "${MESA_FOLDER}usr/lib/"
+fi
+if [ ! -d "${LINK_FOLDER}usr/lib/" ]; then
+ mkdir -p "${LINK_FOLDER}usr/lib/"
+fi
+
+
+
+
+
+
+
+
+
+
+function linkMesa {
+ file=$1
+ if [ -f "/${file}" ]; then
+ # move file to the mesa implementation folder
+ mv "${file}" "${MESA_FOLDER}${file}"
+ # create links from link-folder to mesa-folder
+ ln -s "${MESA_FOLDER}${file}" "${LINK_FOLDER}${file}"
+ # create links from sys-folder to link-folder
+ ln -s "${LINK_FOLDER}${file}" "${file}"
+
+ else
+ # ${file} is a link here
+ rm -rf "${file}"
+ case ${file} in
+ /usr/lib/libGL.so.1)
+ ln -s "${LINK_FOLDER}${file}.2" "${LINK_FOLDER}${file}"
+ ;;
+ *)
+ ;;
+ esac
+ fi
+}
+
+
+
+
+
+
+
+
+
+
+# we create links for all of the binary drivers here
+# - as long as it's possible
+# - if not, add to array of link files
+
+# ATI
+declare -a ATILIBS=($(find ${ATIROOT} -name "*\\.so*" | xargs))
+# with stripped ATIROOT path
+declare -a UATILIBS=(${ATILIBS[@]#${ATIROOT}})
+for lib in ${UATILIBS[@]}; do
+ if [ -e $lib ]; then
+ # this is a conflicting MESA-Library
+ linkMesa $lib
+ fi
+done
+# NVIDIA
+for lib in $(find ${NVROOT} -name "*\\.so*" | xargs); do
+
+done
+
+
+
+
+
+
+
+# go through conflicting libs and link them accordingly
+for file in ${CONFLIBS[@]}; do
+ linkMesa $file
+done
+
+
+
+
+
diff --git a/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
index fd65a4a6..dbcd0ad1 100755
--- a/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
+++ b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
@@ -19,8 +19,6 @@ else
KVER=$(find /lib/modules/2.6* -maxdepth 0|sed 's,/lib/modules/,,g'|sort|tail -n1)
fi
-bash
-
aptitude download linux-restricted-modules-${KVER} > /dev/null 2&>1
MODULE_DEB=$(ls linux-restricted-modules-*.deb | tail -n1)
@@ -29,6 +27,10 @@ dpkg-deb -x ${MODULE_DEB} ${TMP_FOLDER}/modules
case ${TARGET} in
ati)
aptitude download xorg-driver-fglrx > /dev/null 2&>1
+ if [ $? -eq 1 ]; then
+ echo "Didn't get package xorg-driver-fglrx! Starting debug shell.."
+ bash
+ fi
FGLRX_DEB=$(ls xorg-driver-fglrx_*.deb | tail -n1)
# extract $DEB into folder "atiroot"
dpkg-deb -x ${FGLRX_DEB} ${PLUGIN_FOLDER}/ati/atiroot/
@@ -42,7 +44,10 @@ case ${TARGET} in
;;
nvidia)
aptitude download nvidia-glx-new > /dev/null 2&>1
- #oder
+ if [ $? -eq 1 ]; then
+ echo "Didn't get package nvidia-glx-new! Starting debug shell.."
+ bash
+ fi #oder
#aptitude download nvidia-glx
# extract $DEB into folder "nvroot"
NVIDIA_DEB=$(ls nvidia-glx*.deb | tail -n1)
@@ -66,3 +71,19 @@ popd > /dev/null #${TMP_FOLDER}
rm -rf ${TMP_FOLDER}/modules
+
+#
+#
+# TODO: move following line to a more general location
+#
+#
+if [ "${TARGET}" = "ati" ];then
+ ln -s ${PLUGIN_FOLDER}/ati/atiroot/usr/lib/dri/fglrx_dri.so \
+ /usr/lib/dri/fglrx_dri.so
+fi
+
+#if [ "${TARGET}" -eq "nvidia" ];then
+# ln -s ${PLUGIN_FOLDER}/nvidia/nvroot/usr/lib/dri/nvidia_dri.so \
+# /usr/lib/dri/fglrx_dri.so
+#fi
+