Send startup errors to /var/log.

This commit is contained in:
fewtarius 2022-03-27 07:07:34 -04:00
parent 0dc1b07ed2
commit 4bc77520e9
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 16 additions and 16 deletions

View file

@ -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

View file

@ -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