Send startup errors to /var/log.
This commit is contained in:
parent
0dc1b07ed2
commit
4bc77520e9
2 changed files with 16 additions and 16 deletions
|
@ -1,16 +1,16 @@
|
|||
. /etc/profile
|
||||
# Enable GPIO 77 for power LED manipulation
|
||||
echo ${DEVICE_LED} > /sys/class/gpio/export 2>/dev/null
|
||||
echo ${DEVICE_LED} > /sys/class/gpio/export
|
||||
|
||||
# Enable WIFI GPIO for WIFI manipulation
|
||||
echo ${DEVICE_WIFI} > /sys/class/gpio/export 2>/dev/null
|
||||
echo ${DEVICE_WIFI} > /sys/class/gpio/export
|
||||
|
||||
# Power up the WIFI device
|
||||
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction 2>/dev/null
|
||||
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value 2>/dev/null
|
||||
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
|
||||
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
|
||||
|
||||
# Enable PWM for rumble and turn rumble off during startup.
|
||||
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export 2>/dev/null
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period 2>/dev/null
|
||||
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable 2>/dev/null
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle 2>/dev/null
|
||||
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
|
||||
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
. /etc/profile
|
||||
# Silence PWM
|
||||
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export 2>/dev/null
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period 2>/dev/null
|
||||
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable 2>/dev/null
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle 2>/dev/null
|
||||
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
|
||||
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
|
||||
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
|
||||
# Enable WIFI
|
||||
echo ${DEVICE_WIFI} > /sys/class/gpio/export 2>/dev/null
|
||||
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction 2>/dev/null
|
||||
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value 2>/dev/null
|
||||
fbset -g 1152 1920 1152 1920 32 2>/dev/null
|
||||
echo ${DEVICE_WIFI} > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
|
||||
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
|
||||
fbset -g 1152 1920 1152 1920 32
|
||||
|
|
Loading…
Reference in a new issue