From 23bde72a8c625f853f2217e454a9e4e6fdbd1633 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 21 Jul 2023 12:40:26 +0200 Subject: [PATCH] nvidia_current: Add version 510.108.03 Add the userspace part for driver version 510.108.03. Created with the command below and adapting the source URL: $ cp -a nvidia_current-510.60.02-1.bee nvidia_current-510.108.03-0.bee Tested on *sigusr2*: $ dmesg | grep -e "Linux version" -e "DMI:" ; dmesg --level=crit,alert,err,warn [ 0.000000] Linux version 6.1.39.mx64.450 (root@holidayincambodia.molgen.mpg.de) (gcc (GCC) 10.4.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT_DYNAMIC Wed Jul 19 20:07:19 CEST 2023 [ 0.000000] DMI: Dell Inc. OptiPlex 7071/097YXY, BIOS 1.1.2 08/29/2019 [ 1.428282] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks! [ 1.468459] ENERGY_PERF_BIAS: Set to 'normal', was 'performance' [ 2.645812] hpet_acpi_add: no address or irqs in _CRS [ 2.894418] usb: port power management may be unreliable [ 4.099489] wmi_bus wmi_bus-PNP0C14:04: WQBC data block query control method not found [ 14.880380] nvidia: loading out-of-tree module taints kernel. [ 14.886176] nvidia: module license 'NVIDIA' taints kernel. [ 14.891713] Disabling lock debugging due to kernel taint [ 15.273921] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 510.108.03 Thu Oct 20 05:10:45 UTC 2022 [ 15.302831] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint. $ glxinfo | grep info server glx version string: 1.4 client glx version string: 1.4 GLX version: 1.4 OpenGL core profile version string: 4.6.0 NVIDIA 510.108.03 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL version string: 4.6.0 NVIDIA 510.108.03 OpenGL shading language version string: 4.60 NVIDIA OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.108.03 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 GL_EXT_shader_group_vote, GL_EXT_shader_implicit_conversions, --- nvidia_current-510.108.03-0.bee | 93 +++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100755 nvidia_current-510.108.03-0.bee diff --git a/nvidia_current-510.108.03-0.bee b/nvidia_current-510.108.03-0.bee new file mode 100755 index 000000000..f6ab2bb83 --- /dev/null +++ b/nvidia_current-510.108.03-0.bee @@ -0,0 +1,93 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/a225bcb0373cbf6c552ed906bc5c614e/NVIDIA-Linux-x86_64-510.108.03.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + +}