Kim Kempf | 0fcb0ed | 2017-10-24 12:22:17 -0700 | [diff] [blame^] | 1 | #!/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 | # |
| 7 | cd /broadcom |
| 8 | |
| 9 | if [ -f ./voltha_config ]; then |
| 10 | . ./voltha_config |
| 11 | fi |
| 12 | |
| 13 | LD_LIBRARY_PATH=/broadcom |
| 14 | export LD_LIBRARY_PATH |
| 15 | |
| 16 | if [ "${MGMT_IFACE}" = "" ] |
| 17 | then |
| 18 | MGMT_IFACE=ma1 |
| 19 | fi |
| 20 | if [ "${VOLTHA_LOCIP}" = "" ] |
| 21 | then |
| 22 | VOLTHA_LOCIP=$(ifconfig "$MGMT_IFACE" | grep "inet addr" | cut -d : -f 2 | cut -d ' ' -f 1) |
| 23 | fi |
| 24 | echo VOLTHA_LOCIP="${VOLTHA_LOCIP}" |
| 25 | |
| 26 | if [ "${CONSOLE_DEVOUT}" = "" ] |
| 27 | then |
| 28 | CONSOLE_DEVOUT=/dev/console |
| 29 | fi |
| 30 | echo CONSOLE_DEVOUT="${CONSOLE_DEVOUT}" |
| 31 | |
| 32 | if [ "${CONSOLE_DEVINP}" = "" ] |
| 33 | then |
| 34 | CONSOLE_DEVINP=/dev/tty1 |
| 35 | fi |
| 36 | echo CONSOLE_DEVINP="${CONSOLE_DEVINP}" |
| 37 | |
| 38 | if [ "${FAN_RATE}" = "" ] |
| 39 | then |
| 40 | FAN_RATE=70 |
| 41 | fi |
| 42 | echo FAN_RATE="${FAN_RATE}" |
| 43 | echo "${FAN_RATE}" > /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-1/i2c-9/9-0066/fan_duty_cycle_percentage |
| 44 | |
| 45 | echo Starting distributed BAL server |
| 46 | ./bal_core_dist -ne -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} & |
| 47 | sleep 1 |
| 48 | echo Starting VOLTHA BAL driver |
| 49 | ./voltha_bal_driver ${VOLTHA_LOCIP}:50060 -C ${VOLTHA_LOCIP}:40000 -A ${VOLTHA_LOCIP}:50000 2>${CONSOLE_DEVOUT} <${CONSOLE_DEVINP} & |