home · contact · privacy
Improve w530 setup.
[config] / bookworm / setup_scripts / setup_desktop.sh
1 #!/bin/sh
2 set -e
3 set -x
4 debian_version="bookworm"
5 legal_system_names="x220 w530"
6
7 if [ "$#" -ne 1 ]; then
8     echo 'Need exactly one argument (system name).'
9     false
10 fi
11 found=0
12 for system_name_i in $legal_system_names; do
13     if [ "$1" = "$system_name_i" ]; then
14         found=1
15         system_name="${system_name_i}"
16         continue        
17     fi
18 done
19 if [ "$found" = 0 ]; then
20     echo "Need legal system name."
21     false
22 fi
23
24 # Set up system without user environment.
25 config_tree_prefix="${HOME}/config/${debian_version}"
26 setup_scripts_dir="${config_tree_prefix}/setup_scripts"
27 cd "${setup_scripts_dir}"
28 ./setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
29
30 if [ "$system_name" = "w530" ]; then
31     cd
32     git clone https://github.com/NVIDIA/open-gpu-kernel-modules
33     cd open-gpu-kernel-modules
34     git checkout 337e28e
35     make modules -j($nproc)
36     make modules_install
37     cd
38     driver_version=535.86.05
39     runscript=NVIDIA-Linux-x86_64-${driver_version}.run
40     wget https://us.download.nvidia.com/XFree86/Linux-x86_64/${driver_version}/${runscript}
41     chmod u+x ${runscript} 
42     ./${runscript} --no-kernel-modules
43 fi