[ovs-dev] [PATCH 2/2] datapath: Resolve external module dependencies.

Jesse Gross jesse at nicira.com
Wed Jun 26 18:39:33 UTC 2013

On Wed, Jun 26, 2013 at 9:18 AM, Rajahalme, Jarno (NSN - FI/Espoo)
<jarno.rajahalme at nsn.com> wrote:
> On Jun 26, 2013, at 18:27 , ext Jesse Gross wrote:
>> On Wed, Jun 26, 2013 at 8:05 AM, Rajahalme, Jarno (NSN - FI/Espoo)
>> <jarno.rajahalme at nsn.com> wrote:
>>> On Jun 25, 2013, at 22:31 , ext Jesse Gross wrote:
>>>> 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 at nicira.com>
>>>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>>>> ---
>>> ...
>>>> diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
>>>> index 2e445ac..a62e0ca 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 `cat $(KSRC)/include/config/kernel.release`
>>> This line does not work on my system. 'cat' produces "3.2.46", while /lib/modules contains:
>>> 2.6.32-5-amd64  2.6.39-2-amd64  3.1.0-1-amd64  3.2.0-2-amd64  3.2.0-4-amd64
>>> 2.6.38-2-amd64  3.0.0-1-amd64   3.2.0-1-amd64  3.2.0-3-amd64
>> Which one is the correct one and do the modules end up in the right
>> place when you install them? We're piggybacking on the kernel's build
>> system here to install the modules and the Makefile (at least the
>> upstream one) uses that file to determine the location/version.
> The correct one is 3.2.0-4-amd64. The module ends up in /lib/modules/3.2.0-4-amd64/extra/, which I guess is the right place.
>>> so I guess "depmod `uname -r`" would be the right thing to do, which is the same as "depmod" by itself. With this the "make modules_install" seems to succeed.
>> The problem is that this will only work if the kernel that you are
>> building against is currently running.
> OK, so you need to use the kernel version from the "with-linux" option given to configure then?
> I have configured with --with-linux=/lib/modules/`uname -r`/build so that happened to work for me.

Would you mind taking a look at the makefile in the directory that you
passed to "with-linux" to see how it chooses where to install and run

On mine it does:
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
X-CudaMail-Whitelist-To: dev at openvswitch.org

More information about the dev mailing list