Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo 0 > /sys/class/leds/sys_led/device/leds/sys_led/brightness
- GPIO=`fdtget -t x /flash/dtb.img /gpioleds/sys_led gpios`
- GPIO_ACTIVE_FLAG=`echo $GPIO| awk 'END {print $NF}'`
- if [[ "$GPIO_ACTIVE_FLAG" == "0" ]]; then
- echo "SYSTEM LED GPIO IS CORRECT"
- exit 0
- else
- echo "Changing System Led GPIO_ACTIVE flag"
- GP=`echo $GPIO | sed '$s/\w*$//'`
- GPIO=$GP"0"
- mount -o remount,rw /flash
- fdtput -t x /flash/dtb.img /gpioleds/sys_led gpios $GPIO
- sync
- mount -o remount,ro /flash
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement