diff options
| author | Michael Pereira Neves | 2014-03-31 21:14:19 +0200 |
|---|---|---|
| committer | Michael Pereira Neves | 2014-03-31 21:14:19 +0200 |
| commit | c68cfbfde55cf8565ba186dd60f2065e2269650a (patch) | |
| tree | 6dbe7a31e0d943c968fad644f653effc903ae9b7 /remote/modules/nvidia_libs/module.build | |
| parent | [brazilian] add brazilian locale and keymaps (diff) | |
| parent | [vbox] re-set permissions: openslx/script entries (diff) | |
| download | tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.tar.gz tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.tar.xz tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/nvidia_libs/module.build')
| -rw-r--r-- | remote/modules/nvidia_libs/module.build | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/remote/modules/nvidia_libs/module.build b/remote/modules/nvidia_libs/module.build new file mode 100644 index 00000000..38f60d09 --- /dev/null +++ b/remote/modules/nvidia_libs/module.build @@ -0,0 +1,56 @@ +fetch_source() { + mkdir -p src + cd src || perror "Could not change into src directory." + download "$REQUIRED_URL" +} + +build() { + local KERNELSRCDIR="$MODULE_DIR/../kernel/ksrc" # kernel sources + local NVIDIA="$MODULE_DIR/src/$REQUIRED_NVIDIA" + local NVIDIAEXTRACTDIR="$MODULE_BUILD_DIR/NVIDIA" + + pdebug "Unpacking NVidia-Installer ..." + [ -d "$NVIDIAEXTRACTDIR" ] && rm -rf "$NVIDIAEXTRACTDIR" + sh "$NVIDIA" --extract-only --target "$NVIDIAEXTRACTDIR" || perror "Could not extract $NVIDIA to $NVIDIAEXTRACTDIR." + + pinfo "Ready to chroot - may take some time." + pdebug "--- chroot ---------------------------------------------------------------------" + pdebug "- -" + pdebug "- Notice: This may take a while! -" + pdebug "- -" + pdebug "- Please keep note the Nvidia installer _will_ complain about -" + pdebug "- several warnings and errors. It will do this in any case. -" + pdebug "- -" + pdebug "- This does _not_ mean the library module compilation was unsuccessful! -" + pdebug "- -" + pdebug "--------------------------------------------------------------------------------" + + chroot_run "${MODULE_BUILD_DIR}" <<-EOF + /NVIDIA/nvidia-installer --no-nouveau-check --no-network --no-backup --no-rpms --no-runlevel-check --no-distro-scripts --no-cc-version-check --no-x-check --no-precompiled-interface --silent --no-kernel-module + EOF + pinfo "chroot terminated, cleaning up" + + # move whiteout list to its /opt/openslx/etc/nvidia.whiteout + if [ -e "${MODULE_BUILD_DIR}/overlay.whiteout.list" ]; then + mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/etc" + mv "${MODULE_BUILD_DIR}/overlay.whiteout.list" "${MODULE_BUILD_DIR}/opt/openslx/etc/nvidia.whiteout" + fi + + #pdebug "Handling whiteouts ..." + #local WHITEOUT_LIST="${MODULE_BUILD_DIR}/opt/openslx/etc/nvidia.whiteout" + #rm -f -- "$WHOUTEOUT_LIST" + #mkdir -p "$(dirname "$WHITEOUT_LIST")" || perror "Could not create $(dirname "$WHITEOUT_LIST")" + #pdebug "Searching for overlayfs-whiteouts ..." + #for WHITEOUT in $(find "$MODULE_BUILD_DIR" -lname "(overlay-whiteout)"); do +# pdebug "Whiteout found: $WHITEOUT" +# echo "/./${WHITEOUT#$MODULE_BUILD_DIR}" >> "$WHITEOUT_LIST" +# rm -f -- "$WHITEOUT" || perror "Could not delete whiteout $WHITEOUT!" +# done + + rm -rf "$MODULE_BUILD_DIR/NVIDIA" +} + +post_copy() { + : +} + |
