diff options
author | Jonathan Bauer | 2019-06-13 18:36:17 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-06-13 18:36:17 +0200 |
commit | e9990f339358cbb9612625c3932d058660717885 (patch) | |
tree | b3d55bde0dff70441e9f392238a42ad59f5e8a84 /core/modules | |
parent | [mltk] add lsof to core dev tool list (diff) | |
download | mltk-e9990f339358cbb9612625c3932d058660717885.tar.gz mltk-e9990f339358cbb9612625c3932d058660717885.tar.xz mltk-e9990f339358cbb9612625c3932d058660717885.zip |
[nvidia-common] refine kernel module fail detection
Diffstat (limited to 'core/modules')
-rw-r--r-- | core/modules/nvidia-common/module.build | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/modules/nvidia-common/module.build b/core/modules/nvidia-common/module.build index bed7f4ca..619d1170 100644 --- a/core/modules/nvidia-common/module.build +++ b/core/modules/nvidia-common/module.build @@ -33,20 +33,22 @@ build() { [ -d "$destdir" ] && rm -rf "$destdir" sh "$bundle" --extract-only --target "$destdir" || perror "Could not extract $bundle to $destdir." download "${REQUIRED_HTML//%VERSION%/$version}" "$builddir/supportedchips.html" - + local KMOD_ERROR="(ERROR: The nvidia kernel module was not created.|.ko failed to build)" + local KMOD_LOG="/var/log/nvidia-installer.kmod.log" pinfo "Ready to chroot - may take some time." chroot_run "${builddir}" <<-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 \ - --kernel-source-path "/$KERNEL_HEADERS_DIR" - grep -qF '.ko failed to build' /var/log/nvidia-installer.log \ + --log-file-name="$KMOD_LOG" --kernel-source-path "/$KERNEL_HEADERS_DIR" + + grep -qE "$KMOD_ERROR" "$KMOD_LOG" \ || /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 exit 0 # Fake it since it will try to load the module and probably fail EOF - if grep -qF '.ko failed to build' "${builddir}/var/log/nvidia-installer.log"; then - pwarning "Could not compile all kernel modules: $( grep -F '.ko failed to build' "${builddir}/var/log/nvidia-installer.log" )" + if grep -qE "$KMOD_ERROR" "${builddir}${KMOD_LOG}"; then + pwarning "Could not compile all kernel modules: $( grep -E "$KMOD_ERROR" "${builddir}${KMOD_LOG}" )" perror "Bailing out..." fi pinfo "chroot terminated, cleaning up" |