145aa4ff70
* 1. Fixed delta ag5648 PSU modules. 2. Enable build ag5648. Signed-off-by: neal tai <neal.tai@deltaww.com> * 1. Modified the kernel depends for ag5648. 2. Modified platform-modules-ag5648.service for install ag5648. Signed-off-by: neal tai <neal.tai@deltaww.com> * Enable the ag9064. Signed-off-by: Stanley Chi <stanley.chi@deltaww.com> * Add Delta platform et-6248brb Signed-off-by: neal tai <neal.tai@deltaww.com>
81 lines
2.2 KiB
Bash
Executable File
81 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: setup-board
|
|
# Required-Start:
|
|
# Required-Stop:
|
|
# Should-Start:
|
|
# Should-Stop:
|
|
# Default-Start: S
|
|
# Default-Stop: 0 6
|
|
# Short-Description: Setup et-6248brb board.
|
|
### END INIT INFO
|
|
|
|
case "$1" in
|
|
start)
|
|
echo -n "Setting up board... "
|
|
depmod -a
|
|
rmmod i2c-i801
|
|
rmmod i2c-ismt
|
|
modprobe i2c-dev
|
|
modprobe i2c-i801
|
|
modprobe i2c-ismt
|
|
modprobe i2c-mux-pca954x
|
|
modprobe i2c-mux-gpio
|
|
modprobe dni_gpio
|
|
modprobe delta_et-6248brb_platform
|
|
|
|
if [ `uname -a | awk '{print $3}'` = "4.9.0-5-amd64" ]; then
|
|
echo "453" > "/sys/class/gpio/export"
|
|
echo "454" > "/sys/class/gpio/export"
|
|
echo "455" > "/sys/class/gpio/export"
|
|
echo "485" > "/sys/class/gpio/export"
|
|
echo "489" > "/sys/class/gpio/export"
|
|
echo "494" > "/sys/class/gpio/export"
|
|
echo "out" > "/sys/class/gpio/gpio453/direction"
|
|
echo "out" > "/sys/class/gpio/gpio454/direction"
|
|
echo "out" > "/sys/class/gpio/gpio455/direction"
|
|
echo "out" > "/sys/class/gpio/gpio485/direction"
|
|
echo "out" > "/sys/class/gpio/gpio489/direction"
|
|
echo "out" > "/sys/class/gpio/gpio494/direction"
|
|
else
|
|
echo "197" > "/sys/class/gpio/export"
|
|
echo "198" > "/sys/class/gpio/export"
|
|
echo "199" > "/sys/class/gpio/export"
|
|
echo "229" > "/sys/class/gpio/export"
|
|
echo "233" > "/sys/class/gpio/export"
|
|
echo "238" > "/sys/class/gpio/export"
|
|
echo "out" > "/sys/class/gpio/gpio197/direction"
|
|
echo "out" > "/sys/class/gpio/gpio198/direction"
|
|
echo "out" > "/sys/class/gpio/gpio199/direction"
|
|
echo "out" > "/sys/class/gpio/gpio229/direction"
|
|
echo "out" > "/sys/class/gpio/gpio233/direction"
|
|
echo "out" > "/sys/class/gpio/gpio238/direction"
|
|
fi
|
|
|
|
/usr/local/bin/et-6248brb_platform_init.sh
|
|
|
|
sleep 1
|
|
echo "Ethernet48" > "/sys/bus/i2c/devices/4-0050/port_name"
|
|
echo "Ethernet49" > "/sys/bus/i2c/devices/5-0050/port_name"
|
|
|
|
echo "done."
|
|
;;
|
|
|
|
stop)
|
|
echo "done."
|
|
|
|
;;
|
|
|
|
force-reload|restart)
|
|
echo "Not supported"
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: /etc/init.d/platform-modules-et-6248brb.init {start|stop}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|