mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-02 19:11:20 +02:00
x11-drivers/nvidia-drivers: build driver against /lib/modules
There are two ways to build the nvidia-driver - either against a full kernel source tree in /usr/src/linux, or against a slim kernel-devel equivalent in /lib/modules/*/build. The /lib/modules/*/build is provided by sys-kernel/coreos-module, see `install_build_source`. The interesting thing is that in absence of --kernel-source-path, nvidia-installer will autodetect which to use and already builds against /lib/modules/*/build on Flatcar right now. By passing --kernel-name, we make that choice explicit and this allows us to skip the emerge steps of the build. Since this runs in the developer container, there is also no point in trying to execute systemctl or depmod, so pass the flags to disable usage of those. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
b9f2da8566
commit
85f7b86c00
@ -2,17 +2,16 @@
|
||||
|
||||
. /usr/share/coreos/release
|
||||
NVIDIA_DRIVER_BASENAME="$1"
|
||||
|
||||
emerge-gitclone
|
||||
emerge -gKv coreos-sources > /dev/null
|
||||
cp "/usr/lib64/modules/$(ls /usr/lib64/modules)/build/.config" /usr/src/linux/
|
||||
make -C /usr/src/linux modules_prepare
|
||||
KERNEL_NAME="$(ls /lib/modules)"
|
||||
|
||||
cd "/nvidia/${NVIDIA_DRIVER_BASENAME}"
|
||||
./nvidia-installer -s -n \
|
||||
--no-check-for-alternate-installs \
|
||||
--no-kernel-module-source \
|
||||
--kernel-name="${KERNEL_NAME}" \
|
||||
--no-opengl-files \
|
||||
--no-distro-scripts \
|
||||
--no-systemd \
|
||||
--skip-depmod \
|
||||
--kernel-install-path="${PWD}" \
|
||||
--log-file-name="${PWD}/nvidia-installer.log" || true
|
||||
|
Loading…
x
Reference in New Issue
Block a user