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 C602E8DA1 for ; Tue, 22 Sep 2015 08:56:13 +0200 (CEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id CDC9C80B27; Tue, 22 Sep 2015 06:56:12 +0000 (UTC) Received: from dhcp195.koti.laiskiainen.org (vpn1-6-117.ams2.redhat.com [10.36.6.117]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8M6uBt2016101; Tue, 22 Sep 2015 02:56:12 -0400 To: Mario Carrillo , dev@dpdk.org References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> <1442608390-12537-8-git-send-email-mario.alfredo.c.arevalo@intel.com> From: Panu Matilainen Message-ID: <5600FB8B.6070909@redhat.com> Date: Tue, 22 Sep 2015 09:56:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442608390-12537-8-git-send-email-mario.alfredo.c.arevalo@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Subject: Re: [dpdk-dev] [PATCH 7/7] mk: Add hierarchy-file support (linux mod) 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: Tue, 22 Sep 2015 06:56:14 -0000 On 09/18/2015 11:33 PM, Mario Carrillo wrote: > Add hierarchy-file support to the DPDK modules for linux, > when invoking "make install H=1" (hierarchy-file) > > This hierarchy is based on: > http://www.freedesktop.org/software/systemd/man/file-hierarchy.html > > headers will be installed in: $(DESTDIR)/lib/modules > > Signed-off-by: Mario Carrillo > --- > mk/rte.module.mk | 8 ++++++++ > mk/rte.sdkinstall.mk | 4 ++++ > 2 files changed, 12 insertions(+) > > diff --git a/mk/rte.module.mk b/mk/rte.module.mk > index 7bf77c1..4fc43ba 100644 > --- a/mk/rte.module.mk > +++ b/mk/rte.module.mk > @@ -59,6 +59,14 @@ compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1))) > > .PHONY: all > all: install > +# > +# if H (hierarchy-file) varible is equal "1" > +# install modules in /lib/modules/$(KERNEL_DIR). > +# > +ifeq ($(H),1) > + @[ -d $(MOD_DIR)/$(KERNEL_DIR) ] || mkdir -p $(MOD_DIR)/$(KERNEL_DIR) > + $(Q)cp -f $(MODULE).ko $(MOD_DIR)/$(KERNEL_DIR) > +endif > > .PHONY: install > install: build _postinstall > diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk > index b506959..5ddc3f7 100644 > --- a/mk/rte.sdkinstall.mk > +++ b/mk/rte.sdkinstall.mk > @@ -59,6 +59,8 @@ DATA_DIR := $(DESTDIR)/usr/share > INCLUDE_DIR := $(DESTDIR)/usr/include > SBIN_DIR := $(DESTDIR)/usr/sbin > BIN_DIR := $(DESTDIR)/usr/bin > +MOD_DIR := $(DESTDIR)/lib/modules > +KERNEL_DIR := $(shell uname -r)/extra Please don't assume one is always building for the running kernel. Defaulting around uname -r is perfectly reasonable, but there needs to be a way to override it from the cli. For example rte.vars.mk has this: # can be overriden by make command line or exported environment variable RTE_KERNELDIR ?= /lib/modules/$(shell uname -r)/build - Panu -