summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2017-05-10 07:34:00 -0700
committerAaron Plattner <aplattner@nvidia.com>2017-05-10 07:34:00 -0700
commit9d28f289f1d979298a22cbca9744bedf08040310 (patch)
treee709a36c6cce7c804539f645a062fab81d4d8593
parentdb1e8de724d33c4644326d2044537487a653ed41 (diff)
375.66375.66
-rw-r--r--command-list.c2
-rw-r--r--files.c2
-rw-r--r--install-from-cwd.c35
-rw-r--r--kernel.c28
-rw-r--r--manifest.c158
-rw-r--r--misc.c71
-rw-r--r--misc.h4
-rw-r--r--nvLegacy.h1
-rw-r--r--nvidia-installer.c4
-rw-r--r--nvidia-installer.h26
-rw-r--r--option_table.h9
-rw-r--r--version.mk2
12 files changed, 212 insertions, 130 deletions
diff --git a/command-list.c b/command-list.c
index ec22f7b..40a04d9 100644
--- a/command-list.c
+++ b/command-list.c
@@ -906,7 +906,7 @@ ConflictingFileInfo *build_conflicting_file_list(Options *op, Package *p)
for (i = 0; i < p->num_entries; i++) {
PackageEntry *entry = &p->entries[i];
- if (entry->caps.is_shared_lib && !entry->caps.is_wrapper) {
+ if (entry->caps.is_shared_lib && entry->caps.is_conflicting) {
get_conflicting_file_info(entry->name, &cfList[index++]);
}
}
diff --git a/files.c b/files.c
index 4169884..223a0c5 100644
--- a/files.c
+++ b/files.c
@@ -757,6 +757,8 @@ int set_destinations(Options *op, Package *p)
case FILE_TYPE_GRID_LIB:
case FILE_TYPE_GRID_LIB_SYMLINK:
+ case FILE_TYPE_FLEXERA_LIB:
+ case FILE_TYPE_FLEXERA_LIB_SYMLINK:
prefix = op->opengl_prefix;
dir = op->opengl_libdir;
path = p->entries[i].path;
diff --git a/install-from-cwd.c b/install-from-cwd.c
index 47ebdf6..b7b7061 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -32,6 +32,7 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stddef.h>
#include <sys/mman.h>
#include <sys/types.h>
@@ -55,6 +56,20 @@ static int install_kernel_modules(Options *op, Package *p);
static void free_package(Package *p);
static int assisted_module_signing(Options *op, Package *p);
+static const KernelModuleInfo optional_modules[] = {
+ {
+ .module_name = "nvidia-uvm",
+ .optional_module_dependee = "CUDA",
+ .disable_option = "no-unified-memory",
+ .option_offset = offsetof(Options, install_uvm),
+ },
+ {
+ .module_name = "nvidia-drm",
+ .optional_module_dependee = "DRM-KMS",
+ .disable_option = "no-drm",
+ .option_offset = offsetof(Options, install_drm),
+ },
+};
/*
* install_from_cwd() - perform an installation from the current
@@ -167,9 +182,10 @@ int install_from_cwd(Options *op)
if (!check_for_nouveau(op)) goto failed;
- /* ask if we should install the UVM kernel module */
+ /* ask if we should install the optional kernel modules */
- should_install_uvm(op, p);
+ should_install_optional_modules(op, p, optional_modules,
+ ARRAY_LEN(optional_modules));
/* attempt to build the kernel modules for the target kernel */
@@ -622,7 +638,6 @@ static int has_separate_interface_file(char *name) {
return TRUE;
};
-
/*
* Populate the module info records for optional records with information
* that can be used in e.g. error messages.
@@ -631,19 +646,13 @@ static void populate_optional_module_info(KernelModuleInfo *module)
{
int i;
- static struct {
- const char *name;
- char * const dependee;
- char * const disable_option;
- } optional_modules[] = {
- { "nvidia-uvm", "CUDA", "no-unified-memory" },
- };
-
for (i = 0; i < ARRAY_LEN(optional_modules); i++) {
- if (strcmp(optional_modules[i].name, module->module_name) == 0) {
+ if (strcmp(optional_modules[i].module_name, module->module_name) == 0) {
module->is_optional = TRUE;
- module->optional_module_dependee = optional_modules[i].dependee;
+ module->optional_module_dependee =
+ optional_modules[i].optional_module_dependee;
module->disable_option = optional_modules[i].disable_option;
+ module->option_offset = optional_modules[i].option_offset;
return;
}
}
diff --git a/kernel.c b/kernel.c
index 511215b..1a5f3b4 100644
--- a/kernel.c
+++ b/kernel.c
@@ -71,7 +71,7 @@ static int init_libkmod(void);
static void close_libkmod(void);
static int run_conftest(Options *op, const char *dir, const char *args,
char **result);
-static int run_make(Options *op, Package *p, char *dir, const char *target,
+static int run_make(Options *op, Package *p, const char *dir, const char *target,
char **vars, const char *status, int lines);
static void load_kernel_module_quiet(Options *op, const char *module_name);
static void modprobe_remove_kernel_module_quiet(Options *op, const char *name);
@@ -572,13 +572,31 @@ int unpack_kernel_modules(Options *op, Package *p, const char *build_directory,
}
-static int check_file(Options *op, const char *dir, const char *modname)
+static int check_file(Options *op, Package *p, const char *dir,
+ const char *modname)
{
int ret;
char *path;
path = nvstrcat(dir, "/", modname, ".ko", NULL);
ret = access(path, F_OK);
+
+ if (ret == -1) {
+ char *single_module_list = nvstrcat("NV_KERNEL_MODULES=\"", modname,
+ "\"", NULL);
+ char *rebuild_msg = nvstrcat("Checking to see whether the ", modname,
+ " kernel module was successfully built",
+ NULL);
+ /* Attempt to rebuild the individual module, in case the failure
+ * is module-specific and due to a different module */
+ run_make(op, p, dir, single_module_list, NULL, rebuild_msg, 25);
+ nvfree(single_module_list);
+ nvfree(rebuild_msg);
+
+ /* Check the file again */
+ ret = access(path, F_OK);
+ }
+
nvfree(path);
if (ret == -1) {
@@ -933,7 +951,7 @@ int build_kernel_interfaces(Options *op, Package *p,
/* Test to make sure that all kernel modules were built. */
for (i = 0; i < p->num_kernel_modules; i++) {
- if (!check_file(op, builddir, p->kernel_modules[i].module_name)) {
+ if (!check_file(op, p, builddir, p->kernel_modules[i].module_name)) {
handle_optional_module_failure(op,
p->kernel_modules[i], ui_error,
"build");
@@ -1376,7 +1394,7 @@ int test_kernel_modules(Options *op, Package *p)
{
char *cmd = NULL, *data = NULL;
int ret, i;
- const char *depmods[] = { "i2c-core", "drm", "drm-kms-helper" };
+ const char *depmods[] = { "i2c-core", "drm", "drm-kms-helper", "vfio_mdev" };
/*
* If we're building/installing for a different kernel, then we
@@ -2543,7 +2561,7 @@ char *get_machine_arch(Options *op)
* using 'status' as the initial message, expecting 'lines' lines of output
* from the make command.
*/
-static int run_make(Options *op, Package *p, char *dir, const char *target,
+static int run_make(Options *op, Package *p, const char *dir, const char *target,
char **vars, const char *status, int lines) {
char *cmd, *concurrency, *data = NULL;
int i = 0, ret;
diff --git a/manifest.c b/manifest.c
index 2f44bc9..0a9f4bd 100644
--- a/manifest.c
+++ b/manifest.c
@@ -33,23 +33,23 @@
_is_shared_lib, \
_is_opengl, \
_is_temporary, \
- _is_wrapper, \
+ _is_conflicting, \
_inherit_path, \
_glvnd_select \
) \
#_name , FILE_TYPE_ ## _name , \
{ \
- .has_arch = _has_arch, \
- .has_tls_class = _has_tls_class, \
- .installable = _installable, \
- .has_path = _has_path, \
- .is_symlink = _is_symlink, \
- .is_shared_lib = _is_shared_lib, \
- .is_opengl = _is_opengl, \
- .is_temporary = _is_temporary, \
- .is_wrapper = _is_wrapper, \
- .inherit_path = _inherit_path, \
- .glvnd_select = _glvnd_select, \
+ .has_arch = _has_arch, \
+ .has_tls_class = _has_tls_class, \
+ .installable = _installable, \
+ .has_path = _has_path, \
+ .is_symlink = _is_symlink, \
+ .is_shared_lib = _is_shared_lib, \
+ .is_opengl = _is_opengl, \
+ .is_temporary = _is_temporary, \
+ .is_conflicting = _is_conflicting, \
+ .inherit_path = _inherit_path, \
+ .glvnd_select = _glvnd_select, \
}
/*
@@ -63,74 +63,76 @@ static const struct {
} packageEntryFileTypeTable[] = {
/*
- * glvnd_select ---------------------------------------------+
- * inherit_path ------------------------------------------+ |
- * is_wrapper ---------------------------------------+ | |
- * is_temporary ------------------------------------+ | | |
- * is_opengl ---------------------------------+ | | | |
- * is_shared_lib ------------------------------+ | | | | |
- * is_symlink ---------------------------+ | | | | | |
- * has_path ------------------------+ | | | | | | |
- * installable ---------------------+ | | | | | | | |
- * has_tls_class ------------------+ | | | | | | | | |
- * has_arch ---------------+ | | | | | | | | | |
+ * glvnd_select --------------------------------------------+
+ * inherit_path -----------------------------------------+ |
+ * is_conflicting --------------------------------------+ | |
+ * is_temporary -----------------------------------+ | | |
+ * is_opengl --------------------------------+ | | | |
+ * is_shared_lib -----------------------------+ | | | | |
+ * is_symlink --------------------------+ | | | | | |
+ * has_path -----------------------+ | | | | | | |
+ * installable --------------------+ | | | | | | | |
+ * has_tls_class -----------------+ | | | | | | | | |
+ * has_arch --------------+ | | | | | | | | | |
* | | | | | | | | | | |
*/
- { ENTRY(KERNEL_MODULE_SRC, F, F, T, F, F, F, F, F, F, T, F) },
- { ENTRY(KERNEL_MODULE, F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(OPENGL_HEADER, F, F, T, T, F, F, T, F, F, F, F) },
- { ENTRY(CUDA_ICD, F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(OPENGL_LIB, T, F, T, F, F, T, T, F, F, F, F) },
- { ENTRY(CUDA_LIB, T, F, T, T, F, T, F, F, F, F, F) },
- { ENTRY(OPENCL_LIB, T, F, T, T, F, T, F, F, F, F, F) },
- { ENTRY(OPENCL_WRAPPER_LIB, T, F, T, T, F, T, F, F, T, F, F) },
- { ENTRY(OPENCL_LIB_SYMLINK, T, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(OPENCL_WRAPPER_SYMLINK, T, F, F, T, T, F, F, F, T, F, F) },
- { ENTRY(LIBGL_LA, T, F, T, F, F, F, T, T, F, F, F) },
- { ENTRY(TLS_LIB, T, T, T, T, F, T, T, F, F, F, F) },
- { ENTRY(UTILITY_LIB, T, F, T, F, F, T, F, F, F, F, F) },
- { ENTRY(DOCUMENTATION, F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(APPLICATION_PROFILE, F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(MANPAGE, F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(EXPLICIT_PATH, F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(OPENGL_SYMLINK, T, F, F, F, T, F, T, F, F, F, F) },
- { ENTRY(CUDA_SYMLINK, T, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(TLS_SYMLINK, T, T, F, T, T, F, T, F, F, F, F) },
- { ENTRY(UTILITY_LIB_SYMLINK, T, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(INSTALLER_BINARY, F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(UTILITY_BINARY, F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(UTILITY_BIN_SYMLINK, F, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(DOT_DESKTOP, F, F, T, T, F, F, F, T, F, F, F) },
- { ENTRY(XMODULE_SHARED_LIB, F, F, T, T, F, T, F, F, F, F, F) },
- { ENTRY(XMODULE_SYMLINK, F, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(GLX_MODULE_SHARED_LIB, F, F, T, T, F, T, T, F, F, F, F) },
- { ENTRY(GLX_MODULE_SYMLINK, F, F, F, T, T, F, T, F, F, F, F) },
- { ENTRY(XMODULE_NEWSYM, F, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(VDPAU_LIB, T, F, T, T, F, T, F, F, F, F, F) },
- { ENTRY(VDPAU_SYMLINK, T, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(NVCUVID_LIB, T, F, T, F, F, T, F, F, F, F, F) },
- { ENTRY(NVCUVID_LIB_SYMLINK, T, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(ENCODEAPI_LIB, T, F, T, F, F, T, F, F, F, F, F) },
- { ENTRY(ENCODEAPI_LIB_SYMLINK, T, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(VGX_LIB, F, F, T, F, F, T, F, F, F, F, F) },
- { ENTRY(VGX_LIB_SYMLINK, F, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(GRID_LIB, F, F, T, T, F, T, F, F, F, F, F) },
- { ENTRY(GRID_LIB_SYMLINK, F, F, F, T, T, F, F, F, F, F, F) },
- { ENTRY(NVIDIA_MODPROBE, F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(NVIDIA_MODPROBE_MANPAGE,F, F, T, T, F, F, F, F, F, F, F) },
- { ENTRY(MODULE_SIGNING_KEY, F, F, T, F, F, F, F, T, F, F, F) },
- { ENTRY(NVIFR_LIB, T, F, T, F, F, T, F, F, F, F, F) },
- { ENTRY(NVIFR_LIB_SYMLINK, T, F, F, F, T, F, F, F, F, F, F) },
- { ENTRY(XORG_OUTPUTCLASS_CONFIG,F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(DKMS_CONF ,F, F, T, F, F, F, F, T, F, T, F) },
- { ENTRY(GLVND_LIB, T, F, T, F, F, T, T, F, F, F, F) },
- { ENTRY(GLVND_SYMLINK, T, F, F, F, T, F, T, F, F, F, F) },
- { ENTRY(GLX_CLIENT_LIB, T, F, T, F, F, T, T, F, F, F, T) },
- { ENTRY(GLX_CLIENT_SYMLINK, T, F, F, F, T, F, T, F, F, F, T) },
- { ENTRY(VULKAN_ICD_JSON, F, F, T, F, F, F, F, F, F, F, F) },
- { ENTRY(GLVND_EGL_ICD_JSON, F, F, T, F, F, F, T, F, F, F, F) },
- { ENTRY(EGL_CLIENT_LIB, T, F, T, F, F, T, T, F, F, F, T) },
- { ENTRY(EGL_CLIENT_SYMLINK, T, F, F, F, T, F, T, F, F, F, T) },
+ { ENTRY(KERNEL_MODULE_SRC, F, F, T, F, F, F, F, F, T, T, F) },
+ { ENTRY(KERNEL_MODULE, F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(OPENGL_HEADER, F, F, T, T, F, F, T, F, T, F, F) },
+ { ENTRY(CUDA_ICD, F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(OPENGL_LIB, T, F, T, F, F, T, T, F, T, F, F) },
+ { ENTRY(CUDA_LIB, T, F, T, T, F, T, F, F, T, F, F) },
+ { ENTRY(OPENCL_LIB, T, F, T, T, F, T, F, F, T, F, F) },
+ { ENTRY(OPENCL_WRAPPER_LIB, T, F, T, T, F, T, F, F, F, F, F) },
+ { ENTRY(OPENCL_LIB_SYMLINK, T, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(OPENCL_WRAPPER_SYMLINK, T, F, F, T, T, F, F, F, F, F, F) },
+ { ENTRY(LIBGL_LA, T, F, T, F, F, F, T, T, T, F, F) },
+ { ENTRY(TLS_LIB, T, T, T, T, F, T, T, F, T, F, F) },
+ { ENTRY(UTILITY_LIB, T, F, T, F, F, T, F, F, T, F, F) },
+ { ENTRY(DOCUMENTATION, F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(APPLICATION_PROFILE, F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(MANPAGE, F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(EXPLICIT_PATH, F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(OPENGL_SYMLINK, T, F, F, F, T, F, T, F, T, F, F) },
+ { ENTRY(CUDA_SYMLINK, T, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(TLS_SYMLINK, T, T, F, T, T, F, T, F, T, F, F) },
+ { ENTRY(UTILITY_LIB_SYMLINK, T, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(INSTALLER_BINARY, F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(UTILITY_BINARY, F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(UTILITY_BIN_SYMLINK, F, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(DOT_DESKTOP, F, F, T, T, F, F, F, T, T, F, F) },
+ { ENTRY(XMODULE_SHARED_LIB, F, F, T, T, F, T, F, F, T, F, F) },
+ { ENTRY(XMODULE_SYMLINK, F, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(GLX_MODULE_SHARED_LIB, F, F, T, T, F, T, T, F, T, F, F) },
+ { ENTRY(GLX_MODULE_SYMLINK, F, F, F, T, T, F, T, F, T, F, F) },
+ { ENTRY(XMODULE_NEWSYM, F, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(VDPAU_LIB, T, F, T, T, F, T, F, F, T, F, F) },
+ { ENTRY(VDPAU_SYMLINK, T, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(NVCUVID_LIB, T, F, T, F, F, T, F, F, T, F, F) },
+ { ENTRY(NVCUVID_LIB_SYMLINK, T, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(ENCODEAPI_LIB, T, F, T, F, F, T, F, F, T, F, F) },
+ { ENTRY(ENCODEAPI_LIB_SYMLINK, T, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(VGX_LIB, F, F, T, F, F, T, F, F, T, F, F) },
+ { ENTRY(VGX_LIB_SYMLINK, F, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(GRID_LIB, F, F, T, T, F, T, F, F, T, F, F) },
+ { ENTRY(GRID_LIB_SYMLINK, F, F, F, T, T, F, F, F, T, F, F) },
+ { ENTRY(NVIDIA_MODPROBE, F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(NVIDIA_MODPROBE_MANPAGE,F, F, T, T, F, F, F, F, T, F, F) },
+ { ENTRY(MODULE_SIGNING_KEY, F, F, T, F, F, F, F, T, T, F, F) },
+ { ENTRY(NVIFR_LIB, T, F, T, F, F, T, F, F, T, F, F) },
+ { ENTRY(NVIFR_LIB_SYMLINK, T, F, F, F, T, F, F, F, T, F, F) },
+ { ENTRY(XORG_OUTPUTCLASS_CONFIG,F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(DKMS_CONF ,F, F, T, F, F, F, F, T, T, T, F) },
+ { ENTRY(GLVND_LIB, T, F, T, F, F, T, T, F, T, F, F) },
+ { ENTRY(GLVND_SYMLINK, T, F, F, F, T, F, T, F, T, F, F) },
+ { ENTRY(GLX_CLIENT_LIB, T, F, T, F, F, T, T, F, T, F, T) },
+ { ENTRY(GLX_CLIENT_SYMLINK, T, F, F, F, T, F, T, F, T, F, T) },
+ { ENTRY(VULKAN_ICD_JSON, F, F, T, F, F, F, F, F, T, F, F) },
+ { ENTRY(GLVND_EGL_ICD_JSON, F, F, T, F, F, F, T, F, T, F, F) },
+ { ENTRY(EGL_CLIENT_LIB, T, F, T, F, F, T, T, F, T, F, T) },
+ { ENTRY(EGL_CLIENT_SYMLINK, T, F, F, F, T, F, T, F, T, F, T) },
+ { ENTRY(FLEXERA_LIB, F, F, T, T, F, T, F, F, F, F, F) },
+ { ENTRY(FLEXERA_LIB_SYMLINK, F, F, F, T, T, F, F, F, F, F, F) },
};
/*
diff --git a/misc.c b/misc.c
index ab80f93..196cdb6 100644
--- a/misc.c
+++ b/misc.c
@@ -1158,34 +1158,67 @@ void should_install_compat32_files(Options *op, Package *p)
}
+#define member_at_offset(base, offset, target_type) \
+ ((target_type *) ((char *) base + offset))
+
+
+static void set_optional_module_install(Options *op, int offset, int val) {
+ *member_at_offset(op, offset, int) = val;
+}
+
+static int get_optional_module_install(Options *op, int offset) {
+ return *member_at_offset(op, offset, int);
+}
+
/*
- * should_install_uvm() - ask the user if he/she wishes to install UVM
+ * should_install_optional_modules() - ask the user if he/she wishes to install
+ * optional kernel modules
*/
-void should_install_uvm(Options *op, Package *p)
+void should_install_optional_modules(Options *op, Package *p,
+ const KernelModuleInfo* optional_modules,
+ int num_optional_modules)
{
- /* if the package does not include UVM, it can't be installed. */
+ int i;
- if (!package_includes_kernel_module(p, "nvidia-uvm")) {
- op->install_uvm = FALSE;
- return;
- }
+ for (i = 0; i < num_optional_modules; i++) {
+ int install = get_optional_module_install(op,
+ optional_modules[i].option_offset);
- /* ask expert users whether they want to install UVM */
+ /* if the package doesn't include the module, it can't be installed. */
- if (op->expert) {
- op->install_uvm = ui_yes_no(op, op->install_uvm, "Would you like to "
- "install the NVIDIA Unified Memory kernel "
- "module? You must install this module in "
- "order to use CUDA.");
- }
+ if (!package_includes_kernel_module(p,
+ optional_modules[i].module_name)) {
+ set_optional_module_install(op, optional_modules[i].option_offset,
+ FALSE);
+ continue;
+ }
- if (!op->install_uvm) {
- ui_warn(op, "The NVIDIA Unified Memory kernel module will not be "
- "installed. As a result, CUDA applications will not be able to "
- "run with this installation of the NVIDIA driver.");
+ /* ask expert users whether they want to install the module */
+
+ if (op->expert) {
+ int default_value = install;
+ install = ui_yes_no(op, default_value, "Would you like to install "
+ "the %s kernel module? You must install "
+ "this module in order to use %s.",
+ optional_modules[i].module_name,
+ optional_modules[i].optional_module_dependee);
+ if (install != default_value) {
+ set_optional_module_install(op,
+ optional_modules[i].option_offset,
+ install);
+ }
+ }
- remove_kernel_module_from_package(p, "nvidia-uvm");
+ if (!install) {
+ ui_warn(op, "The %s module will not be installed. As a result, %s "
+ "will not function with this installation of the NVIDIA "
+ "driver.", optional_modules[i].module_name,
+ optional_modules[i].optional_module_dependee);
+
+ remove_kernel_module_from_package(p,
+ optional_modules[i].module_name);
+ }
}
}
diff --git a/misc.h b/misc.h
index 6f1ae43..93f8d49 100644
--- a/misc.h
+++ b/misc.h
@@ -70,7 +70,9 @@ int continue_after_error(Options *op, const char *fmt, ...) NV_ATTRIBUTE_PRINTF(
int do_install(Options *op, Package *p, CommandList *c);
void should_install_opengl_headers(Options *op, Package *p);
void should_install_compat32_files(Options *op, Package *p);
-void should_install_uvm(Options *op, Package *p);
+void should_install_optional_modules(Options *op, Package *p,
+ const KernelModuleInfo *optional_modules,
+ int num_optional_modules);
void check_installed_files_from_package(Options *op, Package *p);
int check_installed_file(Options*, const char*, const mode_t, const uint32,
ui_message_func *logwarn);
diff --git a/nvLegacy.h b/nvLegacy.h
index d24cfd1..031b51a 100644
--- a/nvLegacy.h
+++ b/nvLegacy.h
@@ -568,7 +568,6 @@ static const LEGACY_INFO LegacyList[] = {
{ 0x10D8, 0x0000, 0x0000, 5, "NVS 300" },
{ 0x0FEF, 0x0000, 0x0000, 6, "GRID K340" },
{ 0x0FF2, 0x0000, 0x0000, 6, "GRID K1" },
- { 0x118A, 0x0000, 0x0000, 6, "GRID K520" },
{ 0x11BF, 0x0000, 0x0000, 6, "GRID K2" }
};
diff --git a/nvidia-installer.c b/nvidia-installer.c
index fd1af11..ce71bc7 100644
--- a/nvidia-installer.c
+++ b/nvidia-installer.c
@@ -142,6 +142,7 @@ static Options *load_default_options(void)
op->dkms = FALSE;
op->check_for_alternate_installs = TRUE;
op->install_uvm = TRUE;
+ op->install_drm = TRUE;
op->glvnd_glx_client = TRUE;
op->glvnd_egl_client = TRUE;
op->install_compat32_libs = NV_OPTIONAL_BOOL_DEFAULT;
@@ -437,6 +438,9 @@ static void parse_commandline(int argc, char *argv[], Options *op)
case NO_UVM_OPTION:
op->install_uvm = FALSE;
break;
+ case NO_DRM_OPTION:
+ op->install_drm = FALSE;
+ break;
case NO_CHECK_FOR_ALTERNATE_INSTALLS_OPTION:
op->check_for_alternate_installs = FALSE;
break;
diff --git a/nvidia-installer.h b/nvidia-installer.h
index f25d9ef..267aebe 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -152,6 +152,7 @@ typedef struct __options {
int dkms;
int check_for_alternate_installs;
int install_uvm;
+ int install_drm;
int compat32_files_packaged;
int x_files_packaged;
int concurrency_level;
@@ -294,6 +295,8 @@ typedef enum {
FILE_TYPE_GLVND_EGL_ICD_JSON,
FILE_TYPE_EGL_CLIENT_LIB,
FILE_TYPE_EGL_CLIENT_SYMLINK,
+ FILE_TYPE_FLEXERA_LIB,
+ FILE_TYPE_FLEXERA_LIB_SYMLINK,
FILE_TYPE_MAX
} PackageEntryFileType;
@@ -316,17 +319,17 @@ typedef enum {
} PackageEntryFileGLVND;
typedef struct {
- unsigned int has_arch : 1;
- unsigned int has_tls_class : 1;
- unsigned int installable : 1;
- unsigned int has_path : 1;
- unsigned int is_symlink : 1;
- unsigned int is_shared_lib : 1;
- unsigned int is_opengl : 1;
- unsigned int is_temporary : 1;
- unsigned int is_wrapper : 1;
- unsigned int inherit_path : 1;
- unsigned int glvnd_select : 1;
+ unsigned int has_arch : 1;
+ unsigned int has_tls_class : 1;
+ unsigned int installable : 1;
+ unsigned int has_path : 1;
+ unsigned int is_symlink : 1;
+ unsigned int is_shared_lib : 1;
+ unsigned int is_opengl : 1;
+ unsigned int is_temporary : 1;
+ unsigned int is_conflicting : 1;
+ unsigned int inherit_path : 1;
+ unsigned int glvnd_select : 1;
} PackageEntryFileCapabilities;
/*
@@ -422,6 +425,7 @@ typedef struct {
int is_optional; /* e.g. TRUE for "nvidia-uvm" */
char *optional_module_dependee; /* e.g. "CUDA" for "nvidia-uvm" */
char *disable_option; /* e.g. "--no-unified-memory" */
+ int option_offset; /* offset in Options struct for option */
} KernelModuleInfo;
diff --git a/option_table.h b/option_table.h
index d50e939..0bdb48d 100644
--- a/option_table.h
+++ b/option_table.h
@@ -95,6 +95,7 @@ enum {
INSTALL_VDPAU_WRAPPER_OPTION,
NO_CHECK_FOR_ALTERNATE_INSTALLS_OPTION,
NO_UVM_OPTION,
+ NO_DRM_OPTION,
INSTALL_COMPAT32_LIBS_OPTION,
X_SYSCONFIG_PATH_OPTION,
FORCE_LIBGLX_INDIRECT,
@@ -641,6 +642,14 @@ static const NVGetoptOption __options[] = {
"around failures to build or install the Unified Memory kernel module on "
"systems that do not need to run CUDA." },
+ { "no-drm", NO_DRM_OPTION, 0, NULL,
+ "Do not install the nvidia-drm kernel module. This kernel module "
+ "provides several features, including X11 autoconfiguration, support for "
+ "PRIME, and DRM-KMS. The latter is used to support modesetting on "
+ "windowing systems that run independently of X11. The '--no-drm' option "
+ "should only be used to work around failures to build or install the "
+ "nvidia-drm kernel module on systems that do not need these features." },
+
{ "concurrency-level", 'j', NVGETOPT_INTEGER_ARGUMENT, NULL,
"Set the concurrency level for operations such as building the kernel "
"module which may be parallelized on SMP systems. By default, this will "
diff --git a/version.mk b/version.mk
index b16d6ed..52cb65f 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 375.39
+NVIDIA_VERSION = 375.66