mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
install-nvidia: Force building proprietary kernel module
Installers for 570 sometimes default to Open drivers, which we can't support properly at this time. Force proprietary drivers. There are also additional options that suppress certain worrisome error strings - enable those if supported too. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
b048140f97
commit
bfde33bcc3
@ -4,11 +4,35 @@
|
||||
NVIDIA_DRIVER_BASENAME="$1"
|
||||
KERNEL_NAME="$(ls /lib/modules)"
|
||||
|
||||
option_supported() {
|
||||
local opt="$1"
|
||||
./nvidia-installer -A -h | grep -qe "--$opt"
|
||||
}
|
||||
|
||||
cd "/nvidia/${NVIDIA_DRIVER_BASENAME}"
|
||||
|
||||
EXTRA_OPTS=()
|
||||
if option_supported no-rebuild-initramfs ; then
|
||||
EXTRA_OPTS+=( --no-rebuild-initramfs )
|
||||
fi
|
||||
if option_supported skip-module-load ; then
|
||||
EXTRA_OPTS+=( --skip-module-load )
|
||||
fi
|
||||
|
||||
# TODO: open requires firmware loading.
|
||||
# Can we load the module from the nspawn container?
|
||||
if option_supported kernel-module-type ; then
|
||||
EXTRA_OPTS+=( --kernel-module-type=proprietary )
|
||||
elif option_supported kernel-module-build-directory ; then
|
||||
EXTRA_OPTS+=( --kernel-module-build-directory=kernel )
|
||||
fi
|
||||
|
||||
./nvidia-installer -s -n \
|
||||
--no-check-for-alternate-installs \
|
||||
--no-kernel-module-source \
|
||||
--kernel-name="${KERNEL_NAME}" \
|
||||
"${EXTRA_OPTS[@]}" \
|
||||
--no-x-check \
|
||||
--no-opengl-files \
|
||||
--no-distro-scripts \
|
||||
--no-systemd \
|
||||
@ -16,6 +40,9 @@ cd "/nvidia/${NVIDIA_DRIVER_BASENAME}"
|
||||
--kernel-install-path="${PWD}/install-mod" \
|
||||
--log-file-name="${PWD}/nvidia-installer.log" || true
|
||||
|
||||
echo "Last 50 lines of nvidia-installer.log:"
|
||||
tail -n50 nvidia-installer.log || true
|
||||
|
||||
mkdir -p /lib/modules/${KERNEL_NAME}/video
|
||||
mkdir -p "${PWD}"/install-mod
|
||||
cp "${PWD}"/kernel/*.ko "${PWD}"/install-mod
|
||||
|
Loading…
x
Reference in New Issue
Block a user