blob: 2c97375720561b86e5a9d9a29c479c5845cc8c00 [file] [log] [blame]
Shad Ansari6cd46a62018-05-13 23:20:51 +00001#!/bin/bash
2
Girish Gowdraa707e7c2019-11-07 11:36:13 +05303#Copyright 2018-present Open Networking Foundation
Zack Williams477ba092018-10-17 10:50:06 -07004#
Girish Gowdraa707e7c2019-11-07 11:36:13 +05305#Licensed under the Apache License, Version 2.0 (the "License");
6#you may not use this file except in compliance with the License.
7#You may obtain a copy of the License at
Zack Williams477ba092018-10-17 10:50:06 -07008#
Girish Gowdraa707e7c2019-11-07 11:36:13 +05309#http://www.apache.org/licenses/LICENSE-2.0
Zack Williams477ba092018-10-17 10:50:06 -070010#
Girish Gowdraa707e7c2019-11-07 11:36:13 +053011#Unless required by applicable law or agreed to in writing, software
12#distributed under the License is distributed on an "AS IS" BASIS,
13#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#See the License for the specific language governing permissions and
15#limitations under the License.
16
Zack Williams477ba092018-10-17 10:50:06 -070017
Shad Ansaricb004c52018-05-30 18:07:23 +000018rm -rf /opt/bcm68620
19rm -rf /broadcom
Girish Gowdra315344d2020-12-17 08:51:46 -080020tar zxf /tmp/release_asgvolt64_V3.4.9.6.202012040101.tar.gz -C / 2>&1 > /dev/null
Shad Ansaricb004c52018-05-30 18:07:23 +000021grep -q '\/opt\/bcm68620\/svk_init.sh' /etc/rc.local || sed -i -e '$i \/opt\/bcm68620\/svk_init.sh' /etc/rc.local
22rm -f /run/bcm68620
Girish Gowdra70feafd2020-08-06 20:08:26 -070023mkdir -p /opt/openolt && cp /tmp/watchdog/openolt_dev_mgmt_daemon_process_watchdog /opt/openolt && cp /tmp/watchdog/watchdog.config /opt/openolt
Girish Gowdra6e745522020-07-15 15:52:13 -070024[ -f /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog ] && grep -q '\/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog' /etc/rc.local || sed -i -e '$i nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &' /etc/rc.local
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000025cp /tmp/init.d/dev_mgmt_daemon /etc/init.d
Shad Ansarid0eaf752018-08-16 00:26:12 +000026cp /tmp/init.d/openolt /etc/init.d
Nicolas Palpacuer967438f2018-09-07 14:41:54 -040027cp /tmp/logrotate.d/openolt /etc/logrotate.d
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000028chmod +x /etc/init.d/dev_mgmt_daemon
Shad Ansarid0eaf752018-08-16 00:26:12 +000029chmod +x /etc/init.d/openolt
Girish Gowdra6e745522020-07-15 15:52:13 -070030chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000031update-rc.d dev_mgmt_daemon defaults
Shad Ansarid0eaf752018-08-16 00:26:12 +000032update-rc.d openolt defaults
Shad Ansari9fb007d2018-05-14 18:31:38 +000033mv /tmp/openolt /broadcom
Girish Gowdra252f4972020-09-07 21:24:01 -070034mv /tmp/libz.so.1 /usr/local/lib
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000035mv /tmp/libstdc++.so.6 /usr/local/lib
36mv /tmp/libbal_host_api.so /usr/local/lib
Shad Ansaricb004c52018-05-30 18:07:23 +000037/opt/bcm68620/svk_init.sh
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000038[ "A`cat ~/.bashrc| grep LD_LIBRARY_PATH`" = "A" ] && echo "export LD_LIBRARY_PATH=/broadcom:\$LD_LIBRARY_PATH" >> ~/.bashrc; . ~/.bashrc
39ldconfig /broadcom
Orhan Kupusoglu1fd77072021-03-23 08:13:25 -070040# create directory for certificates
41mkdir -p /broadcom/keystore/
Orhan Kupusogluec57af02021-05-12 12:38:17 +000042# Rx optical power test app
43cp -r /tmp/read_rxtx_power /broadcom/
44chmod +x /broadcom/read_rxtx_power