arm-sdk

os build toolkit for various embedded devices
git clone https://git.parazyd.org/arm-sdk
Log | Files | Refs | Submodules | README | LICENSE

99-com.rules (1028B)


      1 SUBSYSTEM=="input", GROUP="input", MODE="0660"
      2 SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
      3 SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
      4 SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
      5 
      6 SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
      7 SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
      8 	chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
      9 	chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
     10 	chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
     11 '"
     12 
     13 KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
     14 	ALIASES=/proc/device-tree/aliases; \
     15 	if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
     16 		echo 0;\
     17 	elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
     18 		echo 1; \
     19 	else \
     20 		exit 1; \
     21 	fi\
     22 '", SYMLINK+="serial%c"
     23 
     24 KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
     25 	ALIASES=/proc/device-tree/aliases; \
     26 	if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
     27 		echo 0; \
     28 	elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
     29 		echo 1; \
     30 	else \
     31 		exit 1; \
     32 	fi \
     33 '", SYMLINK+="serial%c"