Add Nvidia driver to the x86 desktop images (#3572)

* Add Nvidia driver to the x86 desktop images
* Enable this driver on uefi x86 not on arm64
* Enable nvidia driver extension only on desktop builds
This commit is contained in:
Igor Pečovnik
2022-03-29 21:16:45 +02:00
committed by GitHub
parent 5fb60c0caa
commit eb6acd68d3
2 changed files with 14 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
# Important: LINUXFAMILY and ARCH are defined _before_ including the common family include
[[ "$BUILD_DESKTOP" == yes ]] && enable_extension "nvidia"
export LINUXFAMILY="x86"
export ARCH="amd64"
source "${BASH_SOURCE%/*}/include/uefi_common.inc"

13
extensions/nvidia.sh Normal file
View File

@@ -0,0 +1,13 @@
function pre_install_kernel_debs__build_nvidia_kernel_module() {
export INSTALL_HEADERS="yes"
}
function post_install_kernel_debs__build_nvidia_kernel_module() {
display_alert "Build kernel module" "${EXTENSION}" "info"
chroot "${SDCARD}" /bin/bash -c "apt -y -qq install nvidia-dkms-510 nvidia-driver-510 nvidia-settings nvidia-common" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || {
exit_with_error "${install_grub_cmdline} failed!"
}
}