本篇文章參考:
Cubieboard 开箱和入门 | Name5566
tutorials:common:begining_on_lubuntu [Cubieboard Docs]
# ls -l /sys/class/leds
lrwxrwxrwx 1 root root 0 10月 9 08:07 blue:ph21:led1 -> ../../devices/platform/leds-sunxi/leds/blue:ph21:led1
lrwxrwxrwx 1 root root 0 10月 9 08:07 green:ph07:led4 -> ../../devices/platform/leds-sunxi/leds/green:ph07:led4
lrwxrwxrwx 1 root root 0 10月 9 08:07 orange:ph20:led2 -> ../../devices/platform/leds-sunxi/leds/orange:ph20:led2
lrwxrwxrwx 1 root root 0 10月 9 08:07 white:ph11:led3 -> ../../devices/platform/leds-sunxi/leds/white:ph11:led3
由上面的檔案,可以知道:
lde1 藍色 接腳 – ph21
led2 綠色 接腳 – ph07
led3 橘色 接腳 – ph20
led4 白色 接腳 – ph11[@more@] 關閉 led
# ls /sys/class/leds/*/brightness | xargs -i -n1 echo “echo 0 > {}” | sh
讓設定開機時生效
在 /etc/rc.local 最後一行 exit 0 之前加入 ls /sys/class/leds/*/brightness | xargs -i -n1 echo “echo 0 > {}” | sh
# sed -i ‘/^exit 0/ils /sys/class/leds/*/brightness | xargs -i -n1 echo “echo 0 > {}” | sh’ /etc/rc.local