From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C60E08DB1 for ; Wed, 2 Dec 2015 10:53:51 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 463DA1B282B; Wed, 2 Dec 2015 09:53:51 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-7-93.ams2.redhat.com [10.36.7.93]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB29rnCQ017696; Wed, 2 Dec 2015 04:53:50 -0500 To: Thomas Monjalon , dev@dpdk.org References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> <1449028676-19232-7-git-send-email-thomas.monjalon@6wind.com> From: Panu Matilainen Message-ID: <565EBFAD.80508@redhat.com> Date: Wed, 2 Dec 2015 11:53:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1449028676-19232-7-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Subject: Re: [dpdk-dev] [PATCH 06/10] mk: install kernel modules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 09:53:52 -0000 On 12/02/2015 05:57 AM, Thomas Monjalon wrote: > Add kernel modules to "make install". > Nothing is done if there is no kernel module compiled. > > On native Linux, this path is suggested: > kerneldir=/lib/modules/$(uname -r)/extra/dpdk > > Suggested-by: Mario Carrillo > Signed-off-by: Thomas Monjalon > --- > mk/rte.sdkinstall.mk | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk > index 5585974..46253ff 100644 > --- a/mk/rte.sdkinstall.mk > +++ b/mk/rte.sdkinstall.mk > @@ -36,6 +36,7 @@ BUILD_DIR := $O > > prefix ?= /usr/local > exec_prefix ?= $(prefix) > +kerneldir ?= $(exec_prefix)/kmod > bindir ?= $(exec_prefix)/bin > libdir ?= $(exec_prefix)/lib > includedir ?= $(prefix)/include/dpdk > @@ -89,6 +90,7 @@ ifeq '$(DESTDIR)$(if $T,,+)' '' > else > @echo ================== Installing $(DESTDIR)$(prefix)/ > $(Q)$(MAKE) O=$(BUILD_DIR) install-runtime > + $(Q)$(MAKE) O=$(BUILD_DIR) install-kmod > $(Q)$(MAKE) O=$(BUILD_DIR) install-sdk > @echo Installation in $(DESTDIR)$(prefix)/ complete > endif > @@ -105,6 +107,12 @@ install-runtime: > $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) > $(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir) > > +install-kmod: > +ifneq '$(wildcard $O/kmod/*)' '' > + $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir)) > + $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir) > +endif > + > install-sdk: > $(Q)$(call rte_mkdir, $(DESTDIR)$(includedir)) > $(Q)tar -chf - -C $O include | \ > This by default installs the modules to /usr/local/kmod/ with no kernel version etc. That's so broken that it'd be better not to install them at all. So either get the kerneldir right (the correct path is known on Linux and surely BSD too) or dont install them at all unless kerneldir is manually specified. For Linux, it should default to /lib/modules//extra/dpdk on Linux, where is the version those modules were built against (which might or might not have anything to do with uname -r output). - Panu -