From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v2 07/12] mk: install kernel modules Date: Thu, 3 Dec 2015 06:02:04 +0100 Message-ID: <1449118929-19962-8-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> To: dev@dpdk.org Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 651988E72 for ; Thu, 3 Dec 2015 06:03:35 +0100 (CET) Received: by wmec201 with SMTP id c201so6453545wme.1 for ; Wed, 02 Dec 2015 21:03:35 -0800 (PST) In-Reply-To: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add kernel modules to "make install". Nothing is done if there is no kernel module compiled. When using "make install T=", the default path is the same as before. The Linux path is based on host kernel version. Suggested-by: Mario Carrillo Signed-off-by: Thomas Monjalon --- mk/rte.sdkinstall.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 509b50e..3daf241 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -43,9 +43,17 @@ O ?= build BUILD_DIR := $O endif +include $(RTE_SDK)/mk/rte.vars.mk + ifdef T # defaults with T= will install an almost flat staging tree export prefix ?= +kerneldir ?= $(prefix)/kmod +else +ifeq ($(RTE_EXEC_ENV),linuxapp) +kerneldir ?= /lib/modules/$(shell uname -r)/extra/dpdk else +kerneldir ?= /boot/modules +endif prefix ?= /usr/local endif exec_prefix ?= $(prefix) @@ -94,6 +102,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 @@ -110,6 +119,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 | \ -- 2.5.2