VOL-849: Initial changes to compile with BAL 2.6
The OPENOLT_BAL_2.6.0.1.patch file is required to compile this commit.
This patch file has been uploaded to the Broadcom common CS3233745.
Change-Id: I8dbaca0f56cdf6058603371e9c30d2ce6b04df40
diff --git a/mkdebian/debian/asfvolt16.postinst b/mkdebian/debian/asfvolt16.postinst
index f4a7f56..c19fb79 100644
--- a/mkdebian/debian/asfvolt16.postinst
+++ b/mkdebian/debian/asfvolt16.postinst
@@ -1,21 +1,13 @@
#!/bin/bash
-# Extract BAL driver
-tar zxf /tmp/release_asfvolt16.tar.gz -C / 2>&1 > /dev/null
-
-# Copy OpenOLT folder
+rm -rf /opt/bcm68620
+rm -rf /broadcom
+tar zxf /tmp/release_asfvolt16_V02.06.201804301043.tar.gz -C / 2>&1 > /dev/null
+grep -q '\/opt\/bcm68620\/svk_init.sh' /etc/rc.local || sed -i -e '$i \/opt\/bcm68620\/svk_init.sh' /etc/rc.local
+rm -f /run/bcm68620
mv /tmp/openolt /broadcom
-
-# Copy libraries
mv /tmp/libgrpc++_reflection.so.1 /usr/local/lib
mv /tmp/libgrpc++.so.1 /usr/local/lib
mv /tmp/libgrpc.so.6 /usr/local/lib
mv /broadcom/libbal_api_dist.so /usr/local/lib
-
-# Init file
-#mv /tmp/voltha_init.sh /broadcom
-grep -q '\/opt\/bcm68620\/svk_init.sh' /etc/rc.local || sed -i -e '$i \/opt\/bcm68620\/svk_init.sh' /etc/rc.local
-
-source /root/.bashrc
-cd /broadcom && /sbin/ldconfig
-/opt\/bcm68620\/svk_init.sh
+/opt/bcm68620/svk_init.sh
diff --git a/mkdebian/debian/asfvolt16.postrm b/mkdebian/debian/asfvolt16.postrm
index 4c2469f..64bde5b 100644
--- a/mkdebian/debian/asfvolt16.postrm
+++ b/mkdebian/debian/asfvolt16.postrm
@@ -1,15 +1,10 @@
#!/bin/bash
rm -rf /opt/bcm68620
-rm -rf /run/bcm68620
-
rm -rf /broadcom
-
+sed -i '\/opt\/bcm68620\/svk_init.sh/d' /etc/rc.local
+rm -rf /run/bcm68620
rm -rf /usr/local/lib/libgrpc++_reflection.so.1
rm -rf /usr/local/lib/libgrpc++.so.1
rm -rf /usr/local/lib/libgrpc.so.6
rm -rf /usr/local/lib/libbal_api_dist.so
-
-# Remove init scripts
-sed -i '\/opt\/bcm68620\/svk_init.sh/d' /etc/rc.local
-# sed -i '\/broadcom\/voltha_init.sh/d' /etc/rc.local
diff --git a/mkdebian/debian/asfvolt16.preinst b/mkdebian/debian/asfvolt16.preinst
index 3ff3ca5..6660aaa 100644
--- a/mkdebian/debian/asfvolt16.preinst
+++ b/mkdebian/debian/asfvolt16.preinst
@@ -2,7 +2,10 @@
# kill CLI applications
echo "kill running time application"
+[ -n "`pidof bcm_user_appl`" ] && killall bcm_user_appl
+[ -n "`pidof bcm.user`" ] && killall bcm.user
[ -n "`pidof bal_core_dist`" ] && killall bal_core_dist
+[ -n "`pidof voltha_bal_driver`" ] && killall voltha_bal_driver
[ -n "`pidof openolt`" ] && killall openolt
# unload drivers
@@ -10,6 +13,8 @@
[ -n "`lsmod | grep bcm_coop_dba_linux`" ] && rmmod bcm_coop_dba_linux && sleep 1
[ -n "`lsmod | grep bcm_dev_ctrl_linux`" ] && rmmod bcm_dev_ctrl_linux && sleep 1
[ -n "`lsmod | grep i2c_devs`" ] && rmmod i2c_devs && sleep 1
+[ -n "`lsmod | grep trmux`" ] && rmmod trmux && sleep 1
+[ -n "`lsmod | grep fld`" ] && rmmod fld && sleep 1
[ -n "`lsmod | grep os_linux`" ] && rmmod os_linux && sleep 1
[ -n "`lsmod | grep ll_pcie`" ] && rmmod ll_pcie && sleep 1
[ -n "`lsmod | grep linux_user_bde`" ] && rmmod linux-user-bde && sleep 1
diff --git a/mkdebian/debian/changelog b/mkdebian/debian/changelog
index 286153c..3969177 100644
--- a/mkdebian/debian/changelog
+++ b/mkdebian/debian/changelog
@@ -1,8 +1,10 @@
-asfvolt16 (2.4.3.6+accton1.1-0) stable; urgency=high
-
- * Added Pre-emphasis adjustment on the Qumran
- * Added Qumran LED function
- * Patch file name: ACCTON_BAL_2.4.6.10-V201711151812.patch
-
- -- Jason Huang <jasonsc_huang@edge-core.com> Thu, 15 Nov 2017 18:12:32 +0800
-
+asfvolt16 (2.6.0.1+edgecore-V201804301043) stable; urgency=high
+
+ * Based on code from SW-BCM68620_2_6_0_1.zip.
+ * Merged the Accton's fixed done in ACCTON_BAL_2.4.7.12-V201712061142.patch.
+ * To increase the stack size to 2M to avoid segment fault while init bcm.user code.
+ * To modify the BALAPI_OPER_TIMEOUT from 5 to 10 seconds to avoid timeout warning message.
+ * Patch file name: ACCTON_BAL_2.6.0.1-V201804301043.patch
+
+ -- Jason Huang <jasonsc_huang@edge-core.com> Thu, 31 May 2018 10:36:32 +0800
+
diff --git a/mkdebian/debian/control b/mkdebian/debian/control
index dd12b49..c68f14e 100644
--- a/mkdebian/debian/control
+++ b/mkdebian/debian/control
@@ -8,6 +8,6 @@
Package: asfvolt16
Architecture: amd64
Depends: ${shlibs:Depends}
-Description: Broadcom OLT drivers and CLI
- ported from Broadcom SDK-2.4.3.6 package
+Description: Broadcom OLT drivers,CLI
+ ported from Broadcom SDK-2.6.0.1 package
diff --git a/mkdebian/debian/files b/mkdebian/debian/files
index 33ff7dc..4061fba 100644
--- a/mkdebian/debian/files
+++ b/mkdebian/debian/files
@@ -1 +1 @@
-asfvolt16_2.4.3.6+accton1.1-0_amd64.deb misc optional
+asfvolt16_2.6.0.1+edgecore-V201804301043_amd64.deb misc optional
diff --git a/mkdebian/debian/rules b/mkdebian/debian/rules
index b2906d4..c785567 100755
--- a/mkdebian/debian/rules
+++ b/mkdebian/debian/rules
@@ -26,14 +26,14 @@
override_dh_auto_install:
mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/tmp
- cp -a $(CURDIR)/debian/release_asfvolt16.tar.gz $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+ cp -a $(CURDIR)/debian/release_asfvolt16_V02.06.201804301043.tar.gz $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/libgrpc++_reflection.so.1 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/libgrpc++.so.1 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/libgrpc.so.6 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/openolt $(DEB_DH_INSTALL_SOURCEDIR)/tmp
-override_dh_shlibdeps:
- dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(ONLP_LIB_PATH):$(OFDPA_LIB_PATH)
+#override_dh_shlibdeps:
+# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(ONLP_LIB_PATH):$(OFDPA_LIB_PATH)
# avoid auto strip for debug ofagentapp.dbg
#
@@ -69,4 +69,3 @@
@echo ONLP_LIB_PATH=$(ONLP_LIB_PATH)
# @echo OFDPA_LIB_PATH=$(OFDPA_LIB_PATH)
# @echo OFDPA_BIN_PATH=$(OFDPA_BIN_PATH)
-