From ffd6065a2484cf7b24ee0c9300bb14d0e72fdbcd Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Tue, 25 Jun 2013 12:27:13 -0700 Subject: [PATCH] datapath: Resolve external module dependencies. 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 Signed-off-by: Jesse Gross --- INSTALL | 13 ++++--------- datapath/linux/Makefile.main.in | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/INSTALL b/INSTALL index 4749e30d4..0ff237cc0 100644 --- 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 diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in index 2e445ac5a..88f144ccb 100644 --- a/datapath/linux/Makefile.main.in +++ b/datapath/linux/Makefile.main.in @@ -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 -- 2.43.0