mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 21:09:03 +02:00
22 lines
516 B
Plaintext
22 lines
516 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"
|