blob: daa465fa226f0a9c32903fdc15c03ff430ab521f [file] [log] [blame]
Kim Kempf0fcb0ed2017-10-24 12:22:17 -07001#!/bin/sh -e
2#
3# add these lines to ASFvOLT16 /etc/rc.local
4# /opt/bcm68620/svk_init.sh
5# /broadcom/voltha_init.sh
6#
7cd /broadcom
8
9if [ -f ./voltha_config ]; then
10 . ./voltha_config
11fi
12
13LD_LIBRARY_PATH=/broadcom
14export LD_LIBRARY_PATH
15
16if [ "${MGMT_IFACE}" = "" ]
17then
18 MGMT_IFACE=ma1
19fi
20if [ "${VOLTHA_LOCIP}" = "" ]
21then
22 VOLTHA_LOCIP=$(ifconfig "$MGMT_IFACE" | grep "inet addr" | cut -d : -f 2 | cut -d ' ' -f 1)
23fi
24echo VOLTHA_LOCIP="${VOLTHA_LOCIP}"
25
26if [ "${CONSOLE_DEVOUT}" = "" ]
27then
28 CONSOLE_DEVOUT=/dev/console
29fi
30echo CONSOLE_DEVOUT="${CONSOLE_DEVOUT}"
31
32if [ "${CONSOLE_DEVINP}" = "" ]
33then
34 CONSOLE_DEVINP=/dev/tty1
35fi
36echo CONSOLE_DEVINP="${CONSOLE_DEVINP}"
37
38if [ "${FAN_RATE}" = "" ]
39then
40 FAN_RATE=70
41fi
42echo FAN_RATE="${FAN_RATE}"
43echo "${FAN_RATE}" > /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-1/i2c-9/9-0066/fan_duty_cycle_percentage
44
45echo Starting distributed BAL server
46./bal_core_dist -ne -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} &
47sleep 1
48echo Starting VOLTHA BAL driver
49./voltha_bal_driver ${VOLTHA_LOCIP}:50060 -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} &