Re: [yocto] [meta-raspberrypi][PATCH] 99-com.rules: fix error invalid substitution type

2021-05-13 Thread Changqing Li


On 5/13/21 11:48 AM, Khem Raj wrote:

[Please note: This e-mail is from an EXTERNAL e-mail address]

On 5/12/21 8:42 PM, Changqing Li wrote:

From: Changqing Li 

fix below error:
/etc/udev/rules.d/99-com.rules:10 Invalid value "/bin/sh -c
'ALIASES=/proc/device-tree/aliases; if cmp -s $ALIASES/uart0
$ALIASES/serial0; then echo 0;elif cmp -s $ALIASES/uart0
$ALIASES/serial1; then echo 1; else exit 1; fi'" for PROGRAM (char 58:
invalid substitution type)



Can you create a pull request on github for this please.

ok



Signed-off-by: Changqing Li 
---
  recipes-core/udev/udev-rules-rpi/99-com.rules | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules 
b/recipes-core/udev/udev-rules-rpi/99-com.rules

index 6bf019b..ddd1e17 100644
--- a/recipes-core/udev/udev-rules-rpi/99-com.rules
+++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
@@ -1,8 +1,8 @@
  KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
  ALIASES=/proc/device-tree/aliases; \
- if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
+ if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
  echo 0;\
- elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
+ elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
  echo 1; \
  else \
  exit 1; \
@@ -11,9 +11,9 @@ KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\

  KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
  ALIASES=/proc/device-tree/aliases; \
- if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
+ if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
  echo 0; \
- elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
+ elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
  echo 1; \
  else \
  exit 1; \






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#53500): https://lists.yoctoproject.org/g/yocto/message/53500
Mute This Topic: https://lists.yoctoproject.org/mt/82791561/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [meta-raspberrypi][PATCH] 99-com.rules: fix error invalid substitution type

2021-05-12 Thread Khem Raj



On 5/12/21 8:42 PM, Changqing Li wrote:

From: Changqing Li 

fix below error:
/etc/udev/rules.d/99-com.rules:10 Invalid value "/bin/sh -c
'ALIASES=/proc/device-tree/aliases; if cmp -s $ALIASES/uart0
$ALIASES/serial0; then echo 0;elif cmp -s $ALIASES/uart0
$ALIASES/serial1; then echo 1; else exit 1; fi'" for PROGRAM (char 58:
invalid substitution type)



Can you create a pull request on github for this please.


Signed-off-by: Changqing Li 
---
  recipes-core/udev/udev-rules-rpi/99-com.rules | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules 
b/recipes-core/udev/udev-rules-rpi/99-com.rules
index 6bf019b..ddd1e17 100644
--- a/recipes-core/udev/udev-rules-rpi/99-com.rules
+++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
@@ -1,8 +1,8 @@
  KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
-   if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
+   if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
echo 0;\
-   elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
+   elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
@@ -11,9 +11,9 @@ KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
  
  KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\

ALIASES=/proc/device-tree/aliases; \
-   if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
+   if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
echo 0; \
-   elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
+   elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
echo 1; \
else \
exit 1; \






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#53498): https://lists.yoctoproject.org/g/yocto/message/53498
Mute This Topic: https://lists.yoctoproject.org/mt/82791561/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-raspberrypi][PATCH] 99-com.rules: fix error invalid substitution type

2021-05-12 Thread Changqing Li
From: Changqing Li 

fix below error:
/etc/udev/rules.d/99-com.rules:10 Invalid value "/bin/sh -c
'ALIASES=/proc/device-tree/aliases; if cmp -s $ALIASES/uart0
$ALIASES/serial0; then echo 0;elif cmp -s $ALIASES/uart0
$ALIASES/serial1; then echo 1; else exit 1; fi'" for PROGRAM (char 58:
invalid substitution type)

Signed-off-by: Changqing Li 
---
 recipes-core/udev/udev-rules-rpi/99-com.rules | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules 
b/recipes-core/udev/udev-rules-rpi/99-com.rules
index 6bf019b..ddd1e17 100644
--- a/recipes-core/udev/udev-rules-rpi/99-com.rules
+++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
@@ -1,8 +1,8 @@
 KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
-   if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
+   if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
echo 0;\
-   elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
+   elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
@@ -11,9 +11,9 @@ KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
 
 KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
-   if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
+   if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
echo 0; \
-   elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
+   elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#53497): https://lists.yoctoproject.org/g/yocto/message/53497
Mute This Topic: https://lists.yoctoproject.org/mt/82791561/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-