From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hiG2DiOuFP8Ydrmc1HQCsc5MDtmz460owwzbIrCpT1s=; b=KNjaRXYUeSLMGttibQ3ORs9R7f5AtKFPt1YiOde7+ZePhqY5xpx5xjvPsl74HfcAvb M1ruLIFMjpV9rtv6OINv85oAgGX0k6uJY/z678vojE8XqOTYn4d28f5r9DU+2hHEZXIP o75w4eqnJAS4DIgj8HqirVQNmyP8SCdmK2E54AacmZU24LPBy4sxoKJfxM20NY8Io9cZ ptyj8V+4BMpSlpBHT6Ju4YEkzGmKYkrGzUACJ4RCuZmGQWZolYu11twquVfKjaFFfy85 X59FHgSOnyhsPZ/c2nLZZYhWFYNfW4HruNibrsMxVybvTwlf/F4DGnrH41rm09chtUK8 AbUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hiG2DiOuFP8Ydrmc1HQCsc5MDtmz460owwzbIrCpT1s=; b=YKG9eH5aqEgSCJMxnNvHNowP5tmOY4U3XZzuUKzdBGoMSxKOyK0dZPVvgG0xOXFvgF 0R6ccrYQmpmHRZm1mUDvaOIMIF0cSC4r3WNkbAYHesXLPkUu0k7TPNv/z+AUNC5cCSXS A4g1+L6qvhv88pEq8sJdVE9etWRSSAW38jbYGjAomYnxsU6LIfTTZIdQXczj/4zEh76h OVMphqs3YbtADCcIDPkZO+xAFUNVByvapPPCUDt8dlWyMC2ct3zPXXj/KwmZzjGeRzBq LMA/bGgmiklKEJ6VbgrFFlHVCIQRRK9Zbn6Ai5OtJ+Rskojz/nnb7+M+lmYNcc5UIQi/ 6XuQ== X-Gm-Message-State: ALoCoQkAv3HnMM31qq9jGY2IylY6eZmHupRFKJJzgAUkMtuq0maGFvqqS+VaPYx0tff/ZQYBjgF+ X-Received: by 10.28.228.138 with SMTP id b132mr51280080wmh.46.1449119015318; Wed, 02 Dec 2015 21:03:35 -0800 (PST) Received: from XPS13.ibrowse.com ([93.158.46.55]) by smtp.gmail.com with ESMTPSA id gl4sm5720379wjd.17.2015.12.02.21.03.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 21:03:34 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 06:02:04 +0100 Message-Id: <1449118929-19962-8-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449118929-19962-1-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> Subject: [dpdk-dev] [PATCH v2 07/12] 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: Thu, 03 Dec 2015 05:03:35 -0000 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