sonic-buildimage/platform/broadcom/sonic-platform-modules-delta/debian/platform-modules-et-6248brb.init
lguohan 38f3eba695
[kernel]: upgrade kernel to 4.9.0-7 (4.9.110-3+deb9u1) (#1922)
* [kernel]: upgrade kernel to 4.9.0-7 (4.9.110-3+deb9u1)

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* [mellanox]: Update SDK pointer for 4.9.0-7 kernel (#44)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* Update arista drivers for 4.9.0-7 linux kernel (#43)
2018-08-16 08:56:56 -07:00

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