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