d41386a8ac
NVIDIA driver persistence daemon. Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com> [Arnout: - disable on BR2_STATIC_LIBS; - only depend on tirpc if toolchain doesn't have RPC; - use unstripped binary - the strip support in the makefile is utterly broken (and we anyway strip in target-finalize); - define NVIDIA_PERSISTENCED_USERS directly rather than with another variable; - install all the systemd stuff in NVIDIA_PERSISTENCED_INSTALL_INIT_SYSTEMD. ] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
48 lines
1.6 KiB
Makefile
48 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# nvidia-persistenced
|
|
#
|
|
################################################################################
|
|
|
|
NVIDIA_PERSISTENCED_VERSION = 515.48.07
|
|
NVIDIA_PERSISTENCED_SITE = $(call github,NVIDIA,nvidia-persistenced,$(NVIDIA_PERSISTENCED_VERSION))
|
|
NVIDIA_PERSISTENCED_LICENSE = MIT
|
|
NVIDIA_PERSISTENCED_LICENSE_FILES = COPYING
|
|
|
|
NVIDIA_PERSISTENCED_DEPENDENCIES = host-pkgconf
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
NVIDIA_PERSISTENCED_DEPENDENCIES += libtirpc
|
|
endif
|
|
|
|
define NVIDIA_PERSISTENCED_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
|
OUTPUTDIR=. ./nvidia-persistenced.unstripped
|
|
endef
|
|
|
|
define NVIDIA_PERSISTENCED_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m 0755 $(@D)/nvidia-persistenced.unstripped \
|
|
$(TARGET_DIR)/usr/bin/nvidia-persistenced
|
|
endef
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
|
|
define NVIDIA_PERSISTENCED_INSTALL_SYSTEMD_SYSUSERS
|
|
$(INSTALL) -D -m 0644 $(NVIDIA_PERSISTENCED_PKGDIR)/nvidia-persistenced.conf \
|
|
$(TARGET_DIR)/usr/lib/sysusers.d/nvidia-persistenced.conf
|
|
endef
|
|
else
|
|
define NVIDIA_PERSISTENCED_USERS
|
|
nvidia-persistenced -1 nvidia-persistenced -1 * - - - NVIDIA Persistence Daemon
|
|
endef
|
|
endif
|
|
|
|
define NVIDIA_PERSISTENCED_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 0644 $(@D)/init/systemd/nvidia-persistenced.service.template \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/nvidia-persistenced.service
|
|
$(SED) 's/__USER__/nvidia-persistenced/g' \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/nvidia-persistenced.service
|
|
$(NVIDIA_PERSISTENCED_INSTALL_SYSTEMD_SYSUSERS)
|
|
endef
|
|
|
|
$(eval $(generic-package))
|