[Buildroot] [PATCH v2 1/2] package/nvidia-driver: fixup libraries according to README
Arnout Vandecappelle
arnout at mind.be
Sun Jul 25 15:45:14 UTC 2021
Hi Vincent,
On 20/02/2020 21:11, Vincent Fazio wrote:
> Create a symlink for libglx.so and drop libnvidia-wfb.so (aka libwfb.so)
> since all selectable xserver versions in Buildroot provide their own.
>
> VDPAU libraries should be installed into /usr/lib/vdpau/
>
> https://download.nvidia.com/XFree86/Linux-x86_64/390.67/README/installedcomponents.html
>
> Also, allow specifying target subdirectory per library and respect it in
> the install loop.
>
> Signed-off-by: Vincent Fazio <vfazio at xes-inc.com>
I finally applied to master, with a few corrections.
[snip]
> + $(foreach lib,$(NVIDIA_DRIVER_LIBS),
> + $(call NVIDIA_DRIVER_INSTALL_LIB,$(shell echo $(lib) | awk -F":" '{print $$1}'), \
We prefer doing this in make:
$(word 1,$(subst :, ,$(lib)))
> + $(1)/usr/lib/$(shell echo $(lib) | awk -F":" '{print $$2}'))
> )
> endef
>
> @@ -181,18 +187,25 @@ define NVIDIA_DRIVER_INSTALL_STAGING_CMDS
> $(NVIDIA_DRIVER_INSTALL_GL_DEV)
> endef
>
> +define NVIDIA_DRIVER_SYMLINK_LIBGLX
> + # libglx needs a symlink according to the driver README. It has no SONAME
You shouldn't put comments inside a define, put them before it.
> + ln -sf libglx.so.$(NVIDIA_DRIVER_VERSION) \
> + $(TARGET_DIR)/usr/lib/xorg/modules/extensions/libglx.so
> +endef
> +
> # For target, install libraries and X.org modules
> define NVIDIA_DRIVER_INSTALL_TARGET_CMDS
> $(call NVIDIA_DRIVER_INSTALL_LIBS,$(TARGET_DIR))
> - $(foreach m,$(NVIDIA_DRIVER_X_MODS), \
> - $(INSTALL) -D -m 0644 $(@D)/$(notdir $(m)) \
> - $(TARGET_DIR)/usr/lib/xorg/modules/$(m)
> - )
> $(foreach p,$(NVIDIA_DRIVER_PROGS), \
> $(INSTALL) -D -m 0755 $(@D)/$(p) \
> $(TARGET_DIR)/usr/bin/$(p)
> )
> + $(NVIDIA_DRIVER_SYMLINK_LIBGLX)
> $(NVIDIA_DRIVER_INSTALL_KERNEL_MODULE)
> endef
>
> +# Due to a conflict with xserver_xorg-server, this needs to be performed when
> +# finalizing the target filesystem to make sure this version is used.
This is fishy... Is it because xserver_xorg-server creates a symlink or library
with the same name? In that case, the usual way we solve it is that we add a
dependency between the two packages:
NVIDIA_DRIVER_DEPENDENCIES += xserver_xorg-server
That way, nvidia-driver will overwrite whatever xorg-server has done.
However, since I don't completely understand the issue, I left it as is.
Regards,
Arnout
> +NVIDIA_DRIVER_TARGET_FINALIZE_HOOKS += NVIDIA_DRIVER_SYMLINK_LIBGLX
> +
> $(eval $(generic-package))
>
More information about the buildroot
mailing list