datapath: Resolve external module dependencies.
authorJesse Gross <jesse@nicira.com>
Tue, 25 Jun 2013 19:27:13 +0000 (12:27 -0700)
committerJesse Gross <jesse@nicira.com>
Fri, 28 Jun 2013 20:07:22 +0000 (13:07 -0700)
The Open vSwitch kernel module now has dependencies on symbols
exported by other kernel modules (currently just for GRE). In
order for it to load, the dependencies must be correctly resolved
ahead of time. This runs depmod as part of the module installation
process and updates the installation instructions.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
INSTALL
datapath/linux/Makefile.main.in

diff --git a/INSTALL b/INSTALL
index 4749e30..0ff237c 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -209,15 +209,15 @@ Prerequisites section, follow the procedure below to build.
 6. Run "make install" to install the executables and manpages into the
    running system, by default under /usr/local.
 
-7. If you built kernel modules, you may load them with "insmod", e.g.:
+7. If you built kernel modules, you may install and load them, e.g.:
 
-      % insmod datapath/linux/openvswitch.ko
+      % make modules_install
+      % /sbin/modprobe openvswitch 
 
-   You may need to specify a full path to insmod, e.g. /sbin/insmod.
    To verify that the modules have been loaded, run "/sbin/lsmod" and
    check that openvswitch is listed.
 
-   If the "insmod" operation fails, look at the last few kernel log
+   If the "modprobe" operation fails, look at the last few kernel log
    messages (e.g. with "dmesg | tail"):
 
       - The message "openvswitch: exports duplicate symbol
@@ -264,11 +264,6 @@ Prerequisites section, follow the procedure below to build.
    you do not understand what this means or do not know if your driver
    will work, do not set this.
 
-   Once you verify that the kernel modules load properly, you should
-   install them:
-
-      % make modules_install
-
 8. Initialize the configuration database using ovsdb-tool, e.g.:
 
       % mkdir -p /usr/local/etc/openvswitch
index 2e445ac..88f144c 100644 (file)
@@ -71,6 +71,7 @@ default:
 
 modules_install:
        $(MAKE) -C $(KSRC) M=$(builddir) modules_install
+       depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
 endif
 
 # Much of the kernel build system in this file is derived from Intel's