sonic-buildimage/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-silverstone.init
Wirut Getbamrung 65fc916dcf [platform/device] - Implement Silverstone platform API [Chassis/Fan] (#3706)
Implement part of the Chassis and Fan related APIs.

- Chassis APIs

get_base_mac()
get_serial_number()
get_serial_number()
get_system_eeprom_info()
get_reboot_cause()

- Fan APIs

get_direction()
get_speed()
get_target_speed()
get_speed_tolerance()
set_speed()
set_status_led()
get_target_speed()

- Fan APIs base on Device API

get_name()
get_presence()
get_model()
get_serial()
get_status()

Signed-off-by: Wirut Getbamrung wgetbumr@celestica.com
2019-11-06 18:56:17 -08:00

51 lines
1.1 KiB
Bash

#!/bin/bash
### BEGIN INIT INFO
# Provides: setup-board
# Required-Start: $portmap
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Setup SilverStone board.
### END INIT INFO
case "$1" in
start)
echo -n "Setting up board... "
modprobe i2c-dev
modprobe baseboard-lpc
modprobe switchboard
modprobe mc24lc64t
modprobe ipmi_devintf
# Instantiate TLV EEPROM device on I801 bus
devname=`cat /sys/bus/i2c/devices/i2c-0/name`
if [[ $devname == 'SMBus I801 adapter at '* ]]; then
echo 24lc64t 0x56 > /sys/bus/i2c/devices/i2c-0/new_device
fi
decode-syseeprom --init 2> /dev/null &
/bin/sh /usr/local/bin/platform_api_mgnt.sh init
echo "done."
;;
stop)
echo "done."
;;
force-reload|restart)
echo "Not supported"
;;
*)
echo "Usage: /etc/init.d/platform-modules-silverstone.init {start|stop}"
exit 1
;;
esac
exit 0