summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/xserver/files/nvidia-install.sh
diff options
context:
space:
mode:
authorBastian Wissler2008-08-20 18:55:27 +0200
committerBastian Wissler2008-08-20 18:55:27 +0200
commit56a4c8b02c8ff728353175e9d958eb7b0a450b53 (patch)
treed982166d50652fa186e1975153b69b4ff73ae0dd /os-plugins/plugins/xserver/files/nvidia-install.sh
parent* dropped busybox patches as they are now tracked in (diff)
downloadcore-56a4c8b02c8ff728353175e9d958eb7b0a450b53.tar.gz
core-56a4c8b02c8ff728353175e9d958eb7b0a450b53.tar.xz
core-56a4c8b02c8ff728353175e9d958eb7b0a450b53.zip
Updated README of xserver-Plugin and changed ati/nvidia-extraction scripts
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2065 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/files/nvidia-install.sh')
-rwxr-xr-xos-plugins/plugins/xserver/files/nvidia-install.sh54
1 files changed, 29 insertions, 25 deletions
diff --git a/os-plugins/plugins/xserver/files/nvidia-install.sh b/os-plugins/plugins/xserver/files/nvidia-install.sh
index d30008c9..082fe774 100755
--- a/os-plugins/plugins/xserver/files/nvidia-install.sh
+++ b/os-plugins/plugins/xserver/files/nvidia-install.sh
@@ -4,65 +4,69 @@ set -x
# local path
-LPATH=$(pwd)
+FOLDER=$(pwd)
# temp path
-TPATH=${LPATH}/tmp
+TEMP_FOLDER="$1"
+if [ "${TEMP_FOLDER}" -eq "" ]; then
+ TEMP_FOLDER=${FOLDER}
+fi
+
# file to call - should be replaced with argument
-FILE=../NVIDIA-Linux-x86-1.0-9639-pkg1.run
+FILE=NVIDIA-Linux-*.run
# kernel version (not really useful in this context - on a server)
-# todo: we need to fix this for stage1 chroot
+# TODO: we need to fix this for stage1 chroot
KVERS=$(uname -r)
-if [ ! -d $TPATH ]; then
- mkdir -p ${TPATH}
-fi
-
-mkdir -p ${TPATH}/{usr/lib/xorg/modules,lib/modules/${KVERS}/kernel/drivers}
-
# driver path - install modules in this path
DPATH=lib/modules/${KVERS}/kernel/drivers
+if [ ! -d $TEMP_FOLDER ]; then
+ mkdir -p ${TEMP_FOLDER}
+fi
+
+mkdir -p ${TEMP_FOLDER}/{usr/lib/xorg/modules,${DPATH}}
+
# extract contents - we need to fix some things
-./${FILE} -x --target ${TPATH}/src/
+./${FILE} -x --target ${TEMP_FOLDER}/nvidia-files/
##########################################
-# fix:
+# fix for:
# - module installation path
# - automatic module loading
##########################################
sed \
- -e 's,\(^MODULE_ROOT\s*= \)\(/lib/modules\),\1${TPATH}\2,g'\
+ -e 's,\(^MODULE_ROOT\s*= \)\(/lib/modules\),\1${TEMP_FOLDER}\2,g'\
-e '/.* modprobe .*/d' \
- -i ${TPATH}/src/usr/src/nv/Makefile.kbuild
+ -i ${TEMP_FOLDER}/src/usr/src/nv/Makefile.kbuild
-# TODO: perhaps we don't need this part!
-/./${TPATH}/src/nvidia-installer -s --x-prefix=${TPATH} \
+# TODO: perhaps we don't need this part! - it's very slow
+/./${TEMP_FOLDER}/nvidia-files/nvidia-installer -s --x-prefix=${TEMP_FOLDER} \
--no-runlevel-check --no-abi-note --no-x-check\
--no-rpms --no-recursion \
- --x-module-path=${TPATH}/usr/lib/xorg/modules\
- --x-library-path=${TPATH}/usr/lib\
- --opengl-prefix=${TPATH}/usr\
+ --x-module-path=${TEMP_FOLDER}/usr/lib/xorg/modules\
+ --x-library-path=${TEMP_FOLDER}/usr/lib\
+ --opengl-prefix=${TEMP_FOLDER}/usr\
--opengl-libdir=lib\
- --utility-prefix=${TPATH}/usr\
+ --utility-prefix=${TEMP_FOLDER}/usr\
--utility-libdir=lib\
- --documentation-prefix=${TPATH}/usr\
+ --documentation-prefix=${TEMP_FOLDER}/usr\
--no-kernel-module \
-# --kernel-install-path=${TPATH}/lib/modules/${KVERS}/video \
+# --kernel-install-path=${TEMP_FOLDER}/lib/modules/${KVERS}/video \
2>&1 > /dev/null
-mv ${TPATH}/src/usr/src ${TPATH}/usr/
-rm -rf ${TPATH}/usr/share ${TPATH}/src/
+mv ${TEMP_FOLDER}/src/usr/src ${TEMP_FOLDER}/usr/
+rm -rf ${TEMP_FOLDER}/usr/share ${TEMP_FOLDER}/src/
############################################
# build kernel modules
############################################
-pushd ${TPATH}/usr/src/nv/
+pushd ${TEMP_FOLDER}/usr/src/nv/
make -f Makefile.kbuild
popd