mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-07-16 03:46:56 +00:00
2e704f5ef6
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 <changqing.li@windriver.com>
(cherry picked from commit fb253346c2)
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
22 lines
524 B
Plaintext
22 lines
524 B
Plaintext
KERNEL=="ttyAMA[01]", PROGRAM="/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\
|
|
'", SYMLINK+="serial%c"
|
|
|
|
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
|
|
ALIASES=/proc/device-tree/aliases; \
|
|
if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
|
|
echo 0; \
|
|
elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
|
|
echo 1; \
|
|
else \
|
|
exit 1; \
|
|
fi \
|
|
'", SYMLINK+="serial%c"
|