From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from secure15.t-systems.com ([94.100.254.155]) by metis.ext.pengutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YqIcW-00082Z-Rg for ptxdist@pengutronix.de; Thu, 07 May 2015 12:01:34 +0200 Received: from p50989a7d.dip0.t-ipconnect.de ([80.152.154.125] helo=MAIL-10-4.ATS-Intranet.local) by secure15.t-systems.com with smtp (envelope-from ) id 1YqIcO-000170-Ck for ptxdist@pengutronix.de; Thu, 07 May 2015 12:01:26 +0200 Received: from [10.2.1.246] (helo=mail-10-4.ATS-Intranet.local) by MAIL-10-4.ATS-Intranet.local with G Data MailSecurity; for ; Thu, 7 May 2015 12:01:23 +0200 Message-ID: <554B37F2.1090903@atsonline.de> Date: Thu, 7 May 2015 12:01:22 +0200 From: Andreas Geisenhainer MIME-Version: 1.0 References: <554B3561.3030404@atsonline.de> In-Reply-To: <554B3561.3030404@atsonline.de> Content-Type: multipart/mixed; boundary="------------030302090301040106070803" Subject: [ptxdist] custom udev rules and platform dependent projectroot List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --------------030302090301040106070803 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Hello. I expected the udev.make to look for custom rules in the platform projectroot (/configs//projectroot/lib/udev/rules.d/), but it didn't for me. The patch expands the path from the PTXCONF_PLATFORM variable, which chooses the configured platform from multiple potential platforms. regards, Andreas Geisenhainer --------------030302090301040106070803 Content-Type: text/x-patch; name="0001-enabled-copy-of-custom-udev-rules-within-platform-de.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-enabled-copy-of-custom-udev-rules-within-platform-de.pa"; filename*1="tch" >From 94053170a999c83476c4d7ec30d2b5f6abd858b8 Mon Sep 17 00:00:00 2001 From: Andreas Geisenhainer Date: Wed, 6 May 2015 14:23:21 +0200 Subject: [PATCH] enabled copy of custom udev rules within platform dependent projectroot directory enable checking for custom udev rules in "/configs//projectroot/lib/udev/rules.d/" and copying them into target system Signed-off-by: Andreas Geisenhainer --- rules/udev.in | 4 +++- rules/udev.make | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/rules/udev.in b/rules/udev.in index e64a1a9..3146606 100644 --- a/rules/udev.in +++ b/rules/udev.in @@ -102,7 +102,9 @@ config UDEV_CUST_RULES prompt "install customized udev rules" help This will install the customized udev rules files from - projectroot/lib/udev/rules.d into /lib/udev/rules.d + projectroot/lib/udev/rules.d and + configs//projectroot/lib/udev/rules.d + into /lib/udev/rules.d config UDEV_LIBUDEV bool diff --git a/rules/udev.make b/rules/udev.make index dffb91d..28f8280 100644 --- a/rules/udev.make +++ b/rules/udev.make @@ -206,15 +206,24 @@ ifdef PTXCONF_UDEV_KEYMAPS endif ifdef PTXCONF_UDEV_CUST_RULES - @if [ -d $(PTXDIST_WORKSPACE)/projectroot/lib/udev/rules.d/ ]; then \ + @GOT_PROOT=0; \ + if [ -d $(PTXDIST_WORKSPACE)/projectroot/lib/udev/rules.d/ ]; then \ $(call install_tree, udev, 0, 0, \ $(PTXDIST_WORKSPACE)/projectroot/lib/udev/rules.d, \ /lib/udev/rules.d); \ - else \ - echo "UDEV_CUST_RULES is enabled but Directory containing" \ - "customized udev rules is missing!"; \ + GOT_PROOT=$$(($$GOT_PROOT + 1)); \ + fi; \ + if [ -d $(PTXDIST_WORKSPACE)/configs/$(wildcard *$(PTXCONF_PLATFORM)*)/projectroot/lib/udev/rules.d/ ]; then \ + $(call install_tree, udev, 0, 0, \ + $(PTXDIST_WORKSPACE)/configs/$(wildcard *$(PTXCONF_PLATFORM)*)/projectroot/lib/udev/rules.d, \ + /lib/udev/rules.d); \ + GOT_PROOT=$$(($$GOT_PROOT + 1)); \ + fi; \ + if [ \$GOT_PROOT -eq 0 ]; then \ + echo "UDEV_CUST_RULES is enabled but no Directory containing" \ + "customized udev rules was found!"; \ exit 1; \ - fi + fi; endif @$(foreach helper, $(UDEV_HELPER-y), \ -- 2.1.4 --------------030302090301040106070803 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --------------030302090301040106070803--