summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2016-03-21 09:01:40 -0700
committerAaron Plattner <aplattner@nvidia.com>2016-03-21 09:01:40 -0700
commitf9c84f19cfa421a019fedbce0c2fada0c98971ee (patch)
tree5f2f7dff2a657d3286217eb1468eb1d071c17c62
parent1e378a81ceeb06c5899f9c7bfc8dc2f46c52a446 (diff)
364.12364.12
-rw-r--r--Makefile12
-rw-r--r--README87
-rw-r--r--common-utils/common-utils.h6
-rw-r--r--files.c29
-rw-r--r--install-from-cwd.c5
-rw-r--r--kernel.c2
-rw-r--r--manifest.c1
-rw-r--r--nvidia-installer.c2
-rw-r--r--nvidia-installer.h1
-rw-r--r--option_table.h14
-rw-r--r--utils.mk35
-rw-r--r--version.mk2
12 files changed, 145 insertions, 51 deletions
diff --git a/Makefile b/Makefile
index dc6984d..ff33c03 100644
--- a/Makefile
+++ b/Makefile
@@ -200,20 +200,20 @@ MANPAGE_install: $(MANPAGE)
$(MKDIR) $(MANDIR)
$(INSTALL) $(INSTALL_DOC_ARGS) $< $(MANDIR)/$(notdir $<)
-$(MKPRECOMPILED): $(MKPRECOMPILED_OBJS)
+$(eval $(call DEBUG_INFO_RULES, $(MKPRECOMPILED)))
+$(MKPRECOMPILED).unstripped: $(MKPRECOMPILED_OBJS)
$(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
$(MKPRECOMPILED_OBJS) -o $@ $(LIBS)
- $(call quiet_cmd,STRIP_CMD) $@
$(MAKESELF_HELP_SCRIPT): $(MAKESELF_HELP_SCRIPT_OBJS)
$(call quiet_cmd,HOST_LINK) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
$(HOST_BIN_LDFLAGS) $(MAKESELF_HELP_SCRIPT_OBJS) -o $@
-$(NVIDIA_INSTALLER): $(INSTALLER_OBJS)
+$(eval $(call DEBUG_INFO_RULES, $(NVIDIA_INSTALLER)))
+$(NVIDIA_INSTALLER).unstripped: $(INSTALLER_OBJS)
$(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(PCIACCESS_LDFLAGS) \
$(BIN_LDFLAGS) $(INSTALLER_OBJS) -o $@ \
$(LIBS) -Bstatic -lpciaccess -Bdynamic
- $(call quiet_cmd,STRIP_CMD) $@
$(GEN_UI_ARRAY): gen-ui-array.c $(CONFIG_H)
$(call quiet_cmd,HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
@@ -307,9 +307,9 @@ tls_test: tls_test.c
# rule to rebuild rtld_test; a precompiled rtld_test is distributed with
# nvidia-installer to simplify x86-64 builds.
-rebuild_rtld_test: rtld_test.c $(CONFIG_H)
+$(eval $(call DEBUG_INFO_RULES, rebuild_rtld_test))
+rebuild_rtld_test.unstripped: rtld_test.c $(CONFIG_H)
$(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) -o $(RTLD_TEST) -lGL -lEGL $<
- $(call quiet_cmd,STRIP_CMD) $(RTLD_TEST)
# dummy rule to override implicit rule that builds dls_test from
# rtld_test.c
diff --git a/README b/README
index 6201d5f..0b2f0b4 100644
--- a/README
+++ b/README
@@ -37,34 +37,58 @@ it writes this byte data to a temporary file and then dlopens() it.
This directory also contains source for a simple tool 'mkprecompiled',
which is used for stamping nv-linux.o's (aka the kernel interfaces)
with the necessary information so that the installer can match it to a
-running kernel.
-
-To build a precompiled kernel interface, you might do the following:
-
- sh NVIDIA-Linux-x86-1.0-XXXX.run --extract-only
- cd NVIDIA-Linux-x86-1.0-XXXX/usr/src/nv/
- make nv-linux.o
- mkprecompiled --interface=nv-linux.o --output=nv-linux.o-mykernel \
- --description="This is not an interesting description" \
- --proc-version="`cat /proc/version`" \
- --major=1 --minor=0 --patch=XXXX
- mv nv-linux.o-mykernel precompiled/
-
-(where "XXXX" is replaced with the driver version number).
-
-
-To build a precompiled kernel interface for a kernel other than
-the currently running one, you can build nv-linux.o with:
-
- make nv-linux.o SYSSRC=/path/to/kernel-source
-
-and extract the proc version string from a compressed kernel image with:
-
- gzip -dc /boot/vmlinux.gz | strings | grep "^Linux version"
-
-
-
-nvidia-installer will scan the contents of the usr/src/nv/precompiled/
+running kernel. nvidia-installer can automate the process of building
+a precompiled kernel interface package when used with the installer's
+"--add-this-kernel" option - mkprecompiled is a standalone utility that
+can be used to build a precompiled kernel interface package independently
+of nvidia-installer.
+
+To build a precompiled kernel interface package using mkprecompiled, you
+might do the following:
+
+ sh NVIDIA-Linux-x86-XXX.YY.run --extract-only
+ cd NVIDIA-Linux-x86-XXX.YY/kernel/
+ modules=`head -n 4 ../.manifest | tail -n 1`
+ interface_files=`for module in $modules; do
+ echo $module | grep -v nvidia-uvm |
+ sed -e 's/nvidia/nv/' -e 's/$/-linux.o/'
+ done`
+ make $interface_files
+ for interface in $interface_files; do
+ nv_stem=`echo $interface | sed 's/-linux.o$//'`
+ module_name=`echo $nv_stem | sed 's/nv/nvidia/'`
+ ../mkprecompiled --pack precompiled-mykernel \
+ --driver-version XXX.YY \
+ --proc-version-string "`cat /proc/version`" \
+ --description "This is not an interesting description" \
+ --kernel-interface $interface \
+ --linked-module-name $module_name.ko \
+ --core-object-name $module_name/$nv_stem-kernel.o_binary \
+ --target-directory .
+ done
+ if [ -f nvidia-uvm.ko ]; then
+ ../mkprecompiled --pack precompiled-mykernel \
+ --kernel-module nvidia-uvm.ko \
+ --target-directory .
+ fi
+ mkdir -p precompiled
+ mv precompiled-mykernel precompiled
+
+(where "XXX.YY" is replaced with the driver version number).
+
+
+To build precompiled kernel interfaces for a kernel other than the
+currently running one, set SYSSRC=/path/to/kernel-source on the `make`
+command line. If your kernel sources use a separate output directory,
+additionally set SYSOUT=/path/to/kernel-output. You will also need to
+extract the correct proc version string from the kernel image, so that
+it can be passed as an argument to mkprecompiled, e.g.:
+
+ /path/to/kernel-source/scripts/extract-vmlinux /boot/vmlinuz |
+ strings | grep "^Linux version"
+
+
+nvidia-installer will scan the contents of the kernel/precompiled/
directory for any precompiled kernel interfaces that match the running
kernel's /proc/version string.
@@ -72,9 +96,10 @@ If you would like to provide precompiled kernel interfaces for others
to use, you may build them as above. To use them, users can do the
following:
- sh NVIDIA-Linux-x86-1.0-XXXX.run --extract-only
- cp nv-linux.o-mykernel NVIDIA-Linux-x86-1.0-XXXX/usr/src/nv/
- ./NVIDIA-Linux-x86-1.0-XXXX/nvidia-installer
+ sh NVIDIA-Linux-x86-XXX.YY.run --extract-only
+ mkdir -p NVIDIA-Linux-x86-XXX.YY/kernel/precompiled
+ cp precompiled-mykernel NVIDIA-Linux-x86-XXX.YY/kernel/precompiled
+ ./NVIDIA-Linux-x86-XXX.YY/nvidia-installer
(Updated: 2003-09-23) The search path for directories containing
diff --git a/common-utils/common-utils.h b/common-utils/common-utils.h
index 7a1f71a..6ef1d06 100644
--- a/common-utils/common-utils.h
+++ b/common-utils/common-utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2012 NVIDIA Corporation
+ * Copyright (C) 2010-2015 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -40,8 +40,12 @@
#define ARRAY_LEN(_arr) (sizeof(_arr) / sizeof(_arr[0]))
+#ifndef NV_MIN
#define NV_MIN(x,y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef NV_MAX
#define NV_MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
#define TAB " "
#define BIGTAB " "
diff --git a/files.c b/files.c
index 71b0de8..fd8b850 100644
--- a/files.c
+++ b/files.c
@@ -838,6 +838,15 @@ int set_destinations(Options *op, Package *p)
dir = path = "";
break;
+ case FILE_TYPE_VULKAN_ICD_JSON:
+ /*
+ * Defined by the Vulkan Linux ICD loader specification.
+ */
+ prefix = "/etc/vulkan/icd.d/";
+ dir = path = "";
+ path = "";
+ break;
+
default:
/*
@@ -3300,7 +3309,25 @@ int check_libglvnd_files(Options *op, Package *p)
void select_glvnd(Options *op, Package *p)
{
- int i;
+ int i, glvnd_only_files_present = FALSE;
+
+ /* Always install non-GLVND when the package lacks GLVND-specific files */
+
+ for (i = 0; i < p->num_entries; i++) {
+ if (p->entries[i].glvnd == FILE_GLVND_GLVND_ONLY) {
+ glvnd_only_files_present = TRUE;
+ break;
+ }
+ }
+
+ if (!glvnd_only_files_present) {
+ op->glvnd_glx_client = FALSE;
+ ui_log(op, "Package does not include GLVND GLX client libraries: "
+ "forcing '--no-glvnd-glx-client'.");
+ return;
+ }
+
+ /* Allow expert users to change the default or commandline given choice */
if (op->expert) {
const char *choices[2] = {
diff --git a/install-from-cwd.c b/install-from-cwd.c
index da42063..a2c5861 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -307,12 +307,12 @@ int install_from_cwd(Options *op)
goto failed;
/*
- * Leave the RM loaded in case an X server with OutputClass-based driver
+ * Leave nvidia-drm loaded in case an X server with OutputClass-based driver
* matching is being used.
*/
if (!op->no_kernel_module || op->dkms) {
- if (!load_kernel_module(op, p->kernel_modules[0].module_name)) {
+ if (!load_kernel_module(op, "nvidia-drm")) {
goto failed;
}
}
@@ -601,6 +601,7 @@ static int has_separate_interface_file(char *name) {
static const char* no_interface_modules[] = {
"nvidia-uvm",
+ "nvidia-drm",
};
for (i = 0; i < ARRAY_LEN(no_interface_modules); i++) {
diff --git a/kernel.c b/kernel.c
index 2f701a6..ee8c174 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1376,7 +1376,7 @@ int test_kernel_modules(Options *op, Package *p)
{
char *cmd = NULL, *data = NULL;
int ret, i;
- const char *depmods[] = { "i2c-core", "drm" };
+ const char *depmods[] = { "i2c-core", "drm", "drm-kms-helper" };
/*
* If we're building/installing for a different kernel, then we
diff --git a/manifest.c b/manifest.c
index 37c1bbb..108f3e6 100644
--- a/manifest.c
+++ b/manifest.c
@@ -125,6 +125,7 @@ static const struct {
{ 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) },
};
/*
diff --git a/nvidia-installer.c b/nvidia-installer.c
index 4205482..e519f5e 100644
--- a/nvidia-installer.c
+++ b/nvidia-installer.c
@@ -145,7 +145,7 @@ static Options *load_default_options(void)
op->dkms = FALSE;
op->check_for_alternate_installs = TRUE;
op->install_uvm = TRUE;
- op->glvnd_glx_client = FALSE;
+ op->glvnd_glx_client = TRUE;
op->install_compat32_libs = NV_OPTIONAL_BOOL_DEFAULT;
op->install_libglx_indirect = NV_OPTIONAL_BOOL_DEFAULT;
op->install_libglvnd_libraries = NV_OPTIONAL_BOOL_DEFAULT;
diff --git a/nvidia-installer.h b/nvidia-installer.h
index 0413377..32e36c4 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -285,6 +285,7 @@ typedef enum {
FILE_TYPE_GLVND_SYMLINK,
FILE_TYPE_GLX_CLIENT_LIB,
FILE_TYPE_GLX_CLIENT_SYMLINK,
+ FILE_TYPE_VULKAN_ICD_JSON,
FILE_TYPE_MAX
} PackageEntryFileType;
diff --git a/option_table.h b/option_table.h
index f8fed0e..43fee46 100644
--- a/option_table.h
+++ b/option_table.h
@@ -660,13 +660,13 @@ static const NVGetoptOption __options[] = {
"they appear to be missing." },
{ "glvnd-glx-client", GLVND_GLX_CLIENT_OPTION, NVGETOPT_IS_BOOLEAN, NULL,
- "The NVIDIA OpenGL driver may be installed with GLX client libraries "
- "that conform to the GL Vendor Neutral Dispatch (GLVND) infrastructure, "
- "or with legacy GLX client libraries that are not GLVND-compliant. "
- "For maximum compatibility with existing OpenGL applications, the "
- "installer will default to installing non-GLVND GLX client libraries. "
- "The --glvnd-glx-client option will override this default and install "
- "GLVND-compliant GLX client libraries instead."
+ "By default, the NVIDIA OpenGL driver will be installed with the new "
+ "GLVND architecture, to support coexisting with other GLVND-compliant "
+ "OpenGL drivers. However, some applications which do not conform to "
+ "the Linux OpenGL ABI may not be fully compatible with a GLVND-based "
+ "OpenGL driver. The --no-glvnd-glx-client option will select a "
+ "non-GLVND GLX client library (libGL.so.1), which may help to avoid "
+ "compatibility issues with such applications."
},
/* Orphaned options: These options were in the long_options table in
diff --git a/utils.mk b/utils.mk
index 9c50176..958714f 100644
--- a/utils.mk
+++ b/utils.mk
@@ -73,6 +73,7 @@ MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
WHOAMI ?= whoami
+HARDLINK ?= ln -f
HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
@@ -151,6 +152,13 @@ endif
OUTPUTDIR ?= _out/$(TARGET_OS)_$(TARGET_ARCH)
OUTPUTDIR_ABSOLUTE ?= $(CURDIR)/$(OUTPUTDIR)
+NV_SEPARATE_DEBUG_INFO ?=
+NV_KEEP_UNSTRIPPED_BINARIES ?=
+DO_STRIP ?=
+ifneq ($(DEBUG),1)
+ DO_STRIP = 1
+endif
+
NV_QUIET_COMMAND_REMOVED_TARGET_PREFIX ?=
CFLAGS += $(CC_ONLY_CFLAGS)
@@ -288,6 +296,7 @@ quiet_LINK = $(call define_quiet_cmd,LINK ,$@)
quiet_HOST_LINK = $(call define_quiet_cmd,HOST_LINK ,$@)
quiet_M4 = $(call define_quiet_cmd,M4 ,$<)
quiet_STRIP_CMD = $(call define_quiet_cmd,STRIP ,$@)
+quiet_HARDLINK = $(call define_quiet_cmd,HARDLINK ,$@)
##############################################################################
# Tell gmake to delete the target of a rule if it has changed and its
@@ -383,6 +392,32 @@ define DEFINE_OBJECT_RULE
$$(eval $$(call DEFINE_OBJECT_RULE_WITH_DIR,$(1),$(2),$(OUTPUTDIR)))
endef
+# This is a function that will generate rules to build
+# files with separate debug information, if so requested.
+#
+# It takes one parameter: (1) Name of unstripped binary
+#
+# When used, the target for linking should be named (1).unstripped
+#
+# If separate debug information is requested, it will
+# generate a rule to build one from the unstripped binary.
+# If requested, it will also retain the unstripped binary.
+define DEBUG_INFO_RULES
+ $(1): $(1).unstripped
+ ifneq ($(or $(DO_STRIP),$(NV_SEPARATE_DEBUG_INFO)),)
+ $$(call quiet_cmd,STRIP_CMD) -o $$@ $$<
+ else
+ $$(call quiet_cmd,HARDLINK) $$^ $$@
+ endif
+ ifeq ($(NV_SEPARATE_DEBUG_INFO),1)
+ $(1).debug: $(1).unstripped
+ $$(call quiet_cmd,STRIP_CMD) --only-keep-debug -o $$@ $$<
+ $(1): $(1).debug
+ endif
+ ifneq ($(NV_KEEP_UNSTRIPPED_BINARIES),1)
+ .INTERMEDIATE: $(1).unstripped
+ endif
+endef
##############################################################################
# STAMP_C - this is a source file that is generated during the build
diff --git a/version.mk b/version.mk
index 9b784b4..6a12cf6 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12