/sys/class/gpio/gpio105/direction echo_安卓启动脚本">
赞
踩
#!/vendor/bin/sh # LED echo 105 > /sys/class/gpio/export if [ -d "/sys/class/gpio/gpio105" ]; then echo out > /sys/class/gpio/gpio105/direction echo 1 > /sys/class/gpio/gpio105/value fi echo 107 > /sys/class/gpio/export if [ -d "/sys/class/gpio/gpio107" ]; then echo out > /sys/class/gpio/gpio107/direction echo 1 > /sys/class/gpio/gpio107/value fi echo "***************************************************" > /dev/ttyHSL0 echo "*********************** GCI ***********************" > /dev/ttyHSL0 echo "***************************************************" > /dev/ttyHSL0 # uart if [ -c "/dev/ttyHSL1" ]; then chmod 666 /dev/ttyHSL1 fi if [ -c "/dev/ttyHSL2" ]; then chmod 666 /dev/ttyHSL2 fi if [ -c "/dev/ttyHSL3" ]; then chmod 666 /dev/ttyHSL3 fi # spi if [ -c "/dev/spidev7.0" ]; then chmod 666 /dev/spidev7.0 fi # led heart if [ -x "/vendor/bin/gpio_test" ]; then /vendor/bin/gpio_test 105 fi
添加文件
device/qcom/msm8953_64/gpio_test
device/qcom/msm8953_64/lingump.sh
编译到镜像
device/qcom/msm8953_64/msm8953_64.mk
PRODUCT_COPY_FILES += device/qcom/msm8953_64/lingump.sh:/vendor/bin/lingump.sh
PRODUCT_COPY_FILES += device/qcom/msm8953_64/gpio_test:/vendor/bin/gpio_test
system/core/rootdir/init.rc
device/qcom/sepolicy/vendor/common/lingump.te
device/qcom/sepolicy/vendor/common/file_contexts
作者 [@lhgcs]
2020 年 07月 03日
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。