blob: daa465fa226f0a9c32903fdc15c03ff430ab521f [file] [log] [blame]
#!/bin/sh -e
#
# add these lines to ASFvOLT16 /etc/rc.local
# /opt/bcm68620/svk_init.sh
# /broadcom/voltha_init.sh
#
cd /broadcom
if [ -f ./voltha_config ]; then
. ./voltha_config
fi
LD_LIBRARY_PATH=/broadcom
export LD_LIBRARY_PATH
if [ "${MGMT_IFACE}" = "" ]
then
MGMT_IFACE=ma1
fi
if [ "${VOLTHA_LOCIP}" = "" ]
then
VOLTHA_LOCIP=$(ifconfig "$MGMT_IFACE" | grep "inet addr" | cut -d : -f 2 | cut -d ' ' -f 1)
fi
echo VOLTHA_LOCIP="${VOLTHA_LOCIP}"
if [ "${CONSOLE_DEVOUT}" = "" ]
then
CONSOLE_DEVOUT=/dev/console
fi
echo CONSOLE_DEVOUT="${CONSOLE_DEVOUT}"
if [ "${CONSOLE_DEVINP}" = "" ]
then
CONSOLE_DEVINP=/dev/tty1
fi
echo CONSOLE_DEVINP="${CONSOLE_DEVINP}"
if [ "${FAN_RATE}" = "" ]
then
FAN_RATE=70
fi
echo FAN_RATE="${FAN_RATE}"
echo "${FAN_RATE}" > /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-1/i2c-9/9-0066/fan_duty_cycle_percentage
echo Starting distributed BAL server
./bal_core_dist -ne -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} &
sleep 1
echo Starting VOLTHA BAL driver
./voltha_bal_driver ${VOLTHA_LOCIP}:50060 -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} &