summaryrefslogtreecommitdiffstats
path: root/data/nvidia-driver-extraction-experiments.sh
blob: edc06424bd8a66551c8a1f99c6899e04f56acec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash

ROOT_DIR="$HOME"

. "/root/tm-scripts/helper/logging.inc" || exit 1

# XXX: Mounts stuff from my NFS....
[ ! -d /mnt/store ] && mkdir -p /mnt/store
if [ "x$(ls /mnt/store/drivers)" == "x" ]; then
	mount -t nfs -o ro,async,nolock 132.230.8.113:/srv/vmext /mnt/store || perror "Could not mount vmware bundle directory. Exiting."
fi

# There is no generic "--root-prefix=" option, so we have to pass a shitload of arguments, and even then the installer
# does some stuff in your actual system tree... :-( better do some sort of chroot?
function gogo()
{

	local DIR="$ROOT_DIR/build"
	mkdir -p "$DIR" || perror "Couldn ot create $DIR"
	
	local XPREFIX="/usr"
	
	set -x
	
	local XLP="$(X -showDefaultLibPath 2>&1)"
	[ -z "$XLP" ] && XLP="$(pkg-config --variable=libdir xorg-server 2>&1)"
	[ -z "$XLP" ] && XLP="$XPREFIX"
	[ -z "$XLP" ] && perror "Could not determine X lib path"
	
	local XMP="$(X -showDefaultModulePath 2>&1)"
	[ -z "$XMP" ] && XMP="$(pkg-config --variable=moduledir xorg-server 2>&1)"
	[ -z "$XMP" ] && XMP="$XLP"
	[ -z "$XMP" ] && perror "Could not determine X module path"
	
	cd /mnt/store/drivers  || perror "No /mnt/store/drivers"
	set -x
	# TODO: Insert proper kernel name and path from our own kernel <----- XXX
	./NVIDIA-Linux-x86-319.23.run -a --x-prefix="$DIR/$XPREFIX" --x-module-path="$DIR/$XMP" --x-library-path="$DIR/$XLP" --opengl-prefix="$DIR/usr" --utility-prefix="$DIR/usr" --documentation-prefix="$DIR/garbage" --application-profile-path="$DIR/usr/share/nvidia" --kernel-source-path="/root/tm-scripts/remote/modules/kernel/ksrc" --kernel-install-path="$DIR/lib/modules/nvidia" --log-file-name="$DIR/install-log" --ui=none --no-nvidia-modprobe --kernel-name="3.7.10-1.11-desktop-openslx" --no-precompiled-interface --no-rpms --no-network --no-x-check --no-nouveau-check --no-distro-scripts --kernel-module-source-prefix="$DIR/usr/src" --no-questions
	set +x

}

gogo

# --no-questions
# -a
# --x-prefix= ..../usr
# --x-module-path= ... + X -showDefaultModulePath
# --x-library-path= ... + X -showDefaultLibPath (oder --x-prefix)
# --opengl-prefix= .../usr
# --utility-prefix= ..../usr
# --documentation-prefix= müll
# --application-profile-path= ??? /usr/share/nvidia
# --kernel-source-path= unser kack
# --kernel-install-path= .../lib/modules/nvidia
# --log-file-name=
# --ui=none
# --no-nvidia-modprobe
# --kernel-name=UNSERKERNEL
# --no-precompiled-interface
# --no-rpms
# --no-network
# --no-x-check
# --no-nouveau-check
# --no-distro-scripts
# --kernel-module-source-prefix= ..../usr/src