From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 64E4F2E81 for ; Thu, 3 Dec 2015 14:47:06 +0100 (CET) Received: by wmww144 with SMTP id w144so21748083wmw.1 for ; Thu, 03 Dec 2015 05:47:06 -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=+odM72BSN9cepQGefdIKyyt2xF5/ZjC5pMvXSCNCbnE=; b=s5m/VjEJs0cI/iy4GtOOYZkME2vwsWzyWE2F+7Q1ub7CNOyzAmAiDpXf9hnH/xEV3N seh9c9dXNe6Vx+pjuCFOfjRRx9VbbLZmsv0Dnq217uLa6ZRsn8oV+HFR5r8SPRd3cd6+ AxyNAjUNFncePvThd3E1WYPwqZSke3BTH+Kst8cQY4V5iopq7+fCsEcxARCVDJ62SmhS ZPD86g/oifyytBMuRQ/Aa0l0YX6nvpoEEY2NLYKerjqt6qRDI/dKJOD3nRkkKGeEA5Zw tOhLX+21yAHMPE/AmzJXRRatUu5Utw2Luh30dkpp+twiUJIjVwVTB5iDC5T11x+yHv5Y aLyQ== 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=+odM72BSN9cepQGefdIKyyt2xF5/ZjC5pMvXSCNCbnE=; b=MFqOj3rd6VerH3yQp9Ld5RmThwTGgGdF5hMa3BspuDp7VhqUkzFHSIW4I8fLTuS6vP AQJLkLohaLuoSnL3U92dgE9OlI6V0EA27/pP0Ci3Itsi49v0bT8OTX0fhCoYoft+HpXI fvhn3dvgRd9MItnPYO8zg2wNdx8KzINd2DqlZSC+sjEMoRhxBf2ab3iNkaV1XxFkBhiV iK+Vnfo/DJo4rXgdMWI/EmO8VIEgVw6ZC7TTveKAsbpVLSjzJqutrdZ2WdVWWqrOGT6X NuXsZ9URNpeuGz6CGGBa6EJ8nG3Vew15IiO7XMAEax23F9xrmlTjHBmTU2rMfTqgfhGk TNHw== X-Gm-Message-State: ALoCoQkAwjkUm8fysErCX3ERij63Ay6J3MWaqMttUDRcE6VwAYdnxQCmVcM8fPJP0LJP/eqwa5oL X-Received: by 10.194.108.103 with SMTP id hj7mr12461711wjb.143.1449150426284; Thu, 03 Dec 2015 05:47:06 -0800 (PST) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id k133sm8063912wmg.18.2015.12.03.05.47.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Dec 2015 05:47:05 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 14:45:34 +0100 Message-Id: <1449150340-21984-8-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> References: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v3 07/13] 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 13:47:06 -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 Acked-by: Panu Matilainen --- mk/rte.sdkinstall.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index ec093d3..30dea0f 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -43,9 +43,19 @@ O ?= build RTE_OUTPUT := $O endif +ifneq ($(MAKECMDGOALS),pre_install) +include $(RTE_SDK)/mk/rte.vars.mk +endif + 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 +104,7 @@ ifeq ($(DESTDIR)$(if $T,,+),) else @echo ================== Installing $(DESTDIR)$(prefix)/ $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime + $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-kmod $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk @echo Installation in $(DESTDIR)$(prefix)/ complete endif @@ -110,6 +121,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